MCPcopy Index your code
hub / github.com/marijnh/Eloquent-JavaScript / text

Function text

src/render_html.mjs:104–108  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

102 softbreak() { return " " },
103
104 text(token) {
105 let {content} = token
106 if (linkedChapter != null) content = content.replace(/\?/g, linkedChapter)
107 return escape(content)
108 },
109
110 paragraph_open(token) { return `\n\n<p${attrs(token)}>${anchor(token)}` },
111 paragraph_close() { return "</p>" },

Callers

nothing calls this directly

Calls 1

escapeFunction · 0.70

Tested by

no test coverage detected