MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / code_inline

Function code_inline

src/render_latex.mjs:144–151  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

142 td_close(_, i, tokens) { return tokens[i + 1] && tokens[i + 1].type == "td_open" ? " &" : "" },
143
144 code_inline(token) {
145 if (noStarch)
146 return `\\texttt{${escape(token.content)}}`
147 else if (token.content.indexOf("`") > -1)
148 return `\\lstinline|${token.content}|`
149 else
150 return `\\lstinline\`${token.content}\``
151 },
152
153 strong_open() { return "\\textbf{" },
154 strong_close() { return "}" },

Callers

nothing calls this directly

Calls 1

escapeFunction · 0.70

Tested by

no test coverage detected