feat: course website (Astro Starlight)
Pages (index, disclaimer, about), lockfile, root test:site script, fix for Starlight 0.42 sidebar config and <details> rendering in generated MDX. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d41496655e
commit
699d038d1c
@@ -131,6 +131,10 @@ export function mdxSafeProse(prose) {
|
||||
let s = p.s.replace(/<!--[\s\S]*?-->/g, "");
|
||||
s = s.replace(/[{}]/g, (c) => `\\${c}`);
|
||||
s = s.replace(/<(?!\/?(?:details|summary)\s*>)/g, "<");
|
||||
// Put each details/summary tag on its own line with blank lines around it, so the
|
||||
// markdown inside <details> is parsed as markdown rather than as JSX text.
|
||||
s = s.replace(/[ \t]*(<details>|<\/details>|<summary>[^\n]*?<\/summary>)[ \t]*/g, "\n\n$1\n\n");
|
||||
s = s.replace(/\n{3,}/g, "\n\n");
|
||||
return s;
|
||||
})
|
||||
.join("");
|
||||
|
||||
Reference in New Issue
Block a user