Commit d200d4b
authored
feat(v0.5): highlight.js + public demo + screenshots + raw-HTML-escape fix (#73)
* feat(v0.5): highlight.js + public demo deployment + README screenshots
Swap server-side Pygments/codehilite for client-side highlight.js v11.9.0
loaded from a pinned jsdelivr CDN. Both GitHub light and GitHub dark themes
ship with every page; the theme toggle now flips the `disabled` flag on the
`<link>` tags so code blocks stay in sync with the page theme. Fenced code
now emits plain `<pre><code class="language-xxx">` via the fenced_code
extension. Removed the optional Pygments dep from pyproject.toml,
setup.sh/.bat, CI workflows, and the bug-report template.
Build a public demo site from eight dummy sessions across three fictional
projects (demo-blog-engine Rust SSG, demo-ml-pipeline DistilBERT fine-tune,
demo-todo-api FastAPI CRUD) under examples/demo-sessions/. The Pages
workflow now copies these into raw/sessions/ at CI time and deploys via
actions/deploy-pages. No personal data.
Embed six headless-Chrome screenshots in the README (home, sessions,
session detail, changelog, projects, code-heavy session) so the landing
page shows the real product immediately.
15 new tests in tests/test_highlightjs.py lock the swap in place:
language classes, CDN URL shape, both page_head variants, foot script init,
absence of pygments symbols, and an end-to-end build_site smoke test.
178 tests passing (was 163).
* fix(v0.5): escape raw HTML tags in session prose (#74)
A session transcript that mentioned `<textarea>` in prose was leaking
an unclosed element into the DOM, swallowing every following tag —
including the `<script>` that boots highlight.js. The v0.5 swap from
server-side Pygments to client-side hljs (#73) made this pre-existing
bug catastrophic: once the script was stuck inside a broken textarea,
no code block on the page ever got highlighted.
Add `_EscapeRawHtmlPreprocessor` between `fenced_code` (priority 25)
and `html_block` (priority 20) in the markdown pipeline. It escapes
`<tagname>` / `</tagname>` patterns outside inline backtick spans.
Fenced code (already extracted into placeholders), inline code (via
the preprocessor's own backtick-skipping), HTML comments, bare `<`
in math, blockquotes, tables, and link syntax are all untouched.
9 new regression tests in tests/test_highlightjs.py lock it down.
187 passing (was 178). Verified on a real 169-code-block session
page: 0/172 → 172/172 highlighted after the fix, and the dark-theme
stylesheet swap still works.1 parent a5e98d5 commit d200d4b
26 files changed
Lines changed: 1257 additions & 60 deletions
File tree
- .github
- ISSUE_TEMPLATE
- workflows
- docs/images
- examples/demo-sessions
- demo-blog-engine
- demo-ml-pipeline
- demo-todo-api
- llmwiki
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
40 | 50 | | |
| 51 | + | |
41 | 52 | | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
24 | 45 | | |
25 | 46 | | |
26 | 47 | | |
27 | 48 | | |
28 | 49 | | |
29 | 50 | | |
30 | 51 | | |
31 | | - | |
| 52 | + | |
32 | 53 | | |
33 | 54 | | |
34 | 55 | | |
| |||
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
71 | | - | |
| 92 | + | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
| |||
137 | 158 | | |
138 | 159 | | |
139 | 160 | | |
140 | | - | |
141 | | - | |
| 161 | + | |
142 | 162 | | |
143 | 163 | | |
144 | 164 | | |
145 | 165 | | |
146 | 166 | | |
| 167 | + | |
| 168 | + | |
147 | 169 | | |
148 | 170 | | |
149 | 171 | | |
| |||
Loading
Loading
Loading
Loading
Loading
0 commit comments