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

Function meta_figure

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

Source from the content-addressed store, hash-verified

165 inline(token) { return renderArray(token.children) },
166
167 meta_figure(token) {
168 let {url, alt, chapter} = token.args[0]
169 let className = !chapter ? null : "chapter" + (chapter == "true" ? "" : " " + chapter)
170 return `<figure${attrs(token)}${className ? ` class="${className}"` : ""}><img src="${escape(url)}" alt="${escape(alt)}"${close}></figure>`
171 },
172
173 meta_quote_open() { return "\n\n<blockquote>" },
174 meta_quote_close(token) {

Callers

nothing calls this directly

Calls 2

attrsFunction · 0.85
escapeFunction · 0.70

Tested by

no test coverage detected