Loading generateBaseline/mermaid-filter.js +3 −9 Changes for generateBaseline/mermaid-filter.js: 3 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -117,20 +117,14 @@ function renderMermaid(el, caption) { const captionInlines = Array.isArray(caption) ? caption : []; const image = { t: 'Image', c: [[id, [], []], captionInlines, [src, captionInlines.length ? 'fig:' : '']] c: [[id, [], []], captionInlines, [src, 'fig:']] }; if (!captionInlines.length) { return { t: 'Para', c: [image] }; } // Pandoc 3+ docx writer only styles a caption for Figure blocks. // Always a Figure so docx postprocessing can style mermaid like other figures. return { t: 'Figure', c: [ [id, [], []], [null, [{ t: 'Plain', c: captionInlines }]], [null, captionInlines.length ? [{ t: 'Plain', c: captionInlines }] : []], [{ t: 'Plain', c: [image] }] ] }; Loading Loading
generateBaseline/mermaid-filter.js +3 −9 Changes for generateBaseline/mermaid-filter.js: 3 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -117,20 +117,14 @@ function renderMermaid(el, caption) { const captionInlines = Array.isArray(caption) ? caption : []; const image = { t: 'Image', c: [[id, [], []], captionInlines, [src, captionInlines.length ? 'fig:' : '']] c: [[id, [], []], captionInlines, [src, 'fig:']] }; if (!captionInlines.length) { return { t: 'Para', c: [image] }; } // Pandoc 3+ docx writer only styles a caption for Figure blocks. // Always a Figure so docx postprocessing can style mermaid like other figures. return { t: 'Figure', c: [ [id, [], []], [null, [{ t: 'Plain', c: captionInlines }]], [null, captionInlines.length ? [{ t: 'Plain', c: captionInlines }] : []], [{ t: 'Plain', c: [image] }] ] }; Loading