Skip to content

fix wiki rendering: bundle JS locally and fix marked v12 renderer API#28

Merged
kicka5h merged 2 commits intomainfrom
claude/python-snacks-wiki-pages-gtkZQ
Mar 18, 2026
Merged

fix wiki rendering: bundle JS locally and fix marked v12 renderer API#28
kicka5h merged 2 commits intomainfrom
claude/python-snacks-wiki-pages-gtkZQ

Conversation

@kicka5h
Copy link
Copy Markdown
Owner

@kicka5h kicka5h commented Mar 18, 2026

No description provided.

claude added 2 commits March 18, 2026 06:34
The <script type="text/x-markdown"> approach had HTML parsing issues
that prevented the page from rendering. Now uses a single
<script type="application/json"> tag with content generated by
Python's json.dumps(), which handles all escaping correctly.

https://claude.ai/code/session_01BgQZR5yFQxP94gNvDkvavs
The wiki page was stuck on "Loading..." for two reasons:

1. External CDN scripts (marked.js, highlight.js) were unreachable in
   some environments, preventing the markdown renderer from loading.
   Fixed by bundling the libraries locally.

2. The marked v12 custom renderer for `code` and `text` assumed token
   objects, but marked v12 sometimes passes plain strings. Added
   typeof guards to handle both cases.

https://claude.ai/code/session_01BgQZR5yFQxP94gNvDkvavs
@kicka5h kicka5h merged commit cedb4ea into main Mar 18, 2026
3 checks passed
@kicka5h kicka5h deleted the claude/python-snacks-wiki-pages-gtkZQ branch March 18, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants