Skip to content

Commit 1543350

Browse files
juandavclaude
andcommitted
fix: use markup language for all template syntax highlighting
prism-react-renderer doesn't bundle handlebars/pug languages, so use markup (HTML) for all adapters since templates are HTML-based. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 61c353f commit 1543350

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/website/src/pages/preview.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,13 @@ function compileTemplate(
361361
}
362362
}
363363

364+
// prism-react-renderer only bundles a subset of Prism languages.
365+
// 'handlebars' and 'pug' are not included, so we use 'markup' (HTML)
366+
// for all adapters since the templates are HTML-based.
364367
const adapterToLanguage: Record<Adapter, string> = {
365-
handlebars: 'handlebars',
368+
handlebars: 'markup',
366369
ejs: 'markup',
367-
pug: 'pug',
370+
pug: 'markup',
368371
};
369372

370373
function HighlightedEditor({

0 commit comments

Comments
 (0)