Fix inline code escaping

This commit is contained in:
Keisuke Hirata 2026-06-18 23:55:11 +09:00
parent 683151f6bd
commit 6da0ec4c77
No known key found for this signature in database

View File

@ -1,5 +1,5 @@
import { marked } from 'marked';
import { escapeAttribute, escapeHtml, highlightCode } from './highlight.js';
import { escapeAttribute, highlightCode } from './highlight.js';
const modules = import.meta.glob('../../../../doc/manual/souce/**/*.md', {
query: '?raw',
@ -90,7 +90,7 @@ renderer.code = (code, language = '') => {
return `<pre class="code-block"><code${className}>${highlightCode(code, normalizedLanguage)}</code></pre>`;
};
renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
renderer.codespan = (code) => `<code>${code}</code>`;
marked.setOptions({ gfm: true, renderer });