MCPcopy
hub / github.com/markedjs/marked / paragraph

Method paragraph

src/Tokenizer.ts:592–605  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

590 }
591
592 paragraph(src: string): Tokens.Paragraph | undefined {
593 const cap = this.rules.block.paragraph.exec(src);
594 if (cap) {
595 const text = cap[1].charAt(cap[1].length - 1) === '\n'
596 ? cap[1].slice(0, -1)
597 : cap[1];
598 return {
599 type: 'paragraph',
600 raw: cap[0],
601 text,
602 tokens: this.lexer.inline(text),
603 };
604 }
605 }
606
607 text(src: string): Tokens.Text | undefined {
608 const cap = this.rules.block.text.exec(src);

Callers

nothing calls this directly

Calls 1

inlineMethod · 0.80

Tested by

no test coverage detected