SSR fixes

This commit is contained in:
Robert Jelic
2025-09-14 11:41:26 +02:00
parent 741a53aa04
commit 9c7186011b
5 changed files with 303 additions and 270 deletions

View File

@@ -8,16 +8,12 @@ function codeBlockRunPlugin(md) {
const info = token.info.trim()
const content = token.content
// Check if the code block has a 'run' attribute
if (info.includes('run')) {
// Remove 'run' from info for standard rendering
const cleanInfo = info.replace(/\s*run\s*/, '').trim()
token.info = cleanInfo
// Render the standard code block
const codeHtml = defaultFence(tokens, idx, options, env, self)
// Wrap with run button - no language badge since we hide it anyway
return `
<div class="code-block-with-run">
<div class="code-header">