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

Function tokenizer

test/unit/marked.test.js:66–76  ·  view source on GitHub ↗
(src)

Source from the content-addressed store, hash-verified

64 name: 'underline',
65 level: 'block',
66 tokenizer(src) {
67 const rule = /^:([^\n]*)(?:\n|$)/;
68 const match = rule.exec(src);
69 if (match) {
70 return {
71 type: 'underline',
72 raw: match[0], // This is the text that you want your token to consume from the source
73 text: match[1].trim(), // You can add additional properties to your tokens to pass along to the renderer
74 };
75 }
76 },
77 renderer(token) {
78 return `<u>${token.text}</u>\n`;
79 },

Callers

nothing calls this directly

Calls 2

inlineTokensMethod · 0.80
inlineMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…