mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
fix: Backslash now appears in 🤷.
This commit is contained in:
@@ -22,7 +22,7 @@ public/ ← build output (generated)
|
|||||||
| `content.odin` | `Page` struct, content walker, page loader, cmark integration, full markdown pipeline |
|
| `content.odin` | `Page` struct, content walker, page loader, cmark integration, full markdown pipeline |
|
||||||
| `footnotes.odin` | Note definition stripping (pre-cmark) + sidenote/marginnote injection (post-cmark) |
|
| `footnotes.odin` | Note definition stripping (pre-cmark) + sidenote/marginnote injection (post-cmark) |
|
||||||
| `alerts.odin` | GitHub alert post-processor (`> [!CAUTION]` → styled blockquote) |
|
| `alerts.odin` | GitHub alert post-processor (`> [!CAUTION]` → styled blockquote) |
|
||||||
| `emoji.odin` | Emoji shortcode expander (`:shrug:` → `¯\_(ツ)_/¯`) |
|
| `emoji.odin` | Emoji shortcode expander (`:shrug:` → `¯\_(ツ)_/¯`), post-cmark |
|
||||||
| `highlight.odin` | Post-cmark Tree-sitter syntax highlighter; loads grammars/queries from Helix, caches loaded grammars, reports syntax errors with file/line |
|
| `highlight.odin` | Post-cmark Tree-sitter syntax highlighter; loads grammars/queries from Helix, caches loaded grammars, reports syntax errors with file/line |
|
||||||
| `tree_sitter.odin` | C FFI bindings for Tree-sitter (TSParser, TSQuery, TSQueryCursor, node traversal, dlopen/dlsym) |
|
| `tree_sitter.odin` | C FFI bindings for Tree-sitter (TSParser, TSQuery, TSQueryCursor, node traversal, dlopen/dlsym) |
|
||||||
| `sectionate.odin` | `wrap_sections` proc — splits HTML at `<h2` into `<section>` wrappers |
|
| `sectionate.odin` | `wrap_sections` proc — splits HTML at `<h2` into `<section>` wrappers |
|
||||||
@@ -71,6 +71,7 @@ raw markdown
|
|||||||
→ expand_emoji (pre-cmark: :shortcode: → unicode)
|
→ expand_emoji (pre-cmark: :shortcode: → unicode)
|
||||||
→ strip_definitions (pre-cmark: extract [^id]: definitions)
|
→ strip_definitions (pre-cmark: extract [^id]: definitions)
|
||||||
→ cmark markdown_to_html (Unsafe mode for HTML passthrough)
|
→ cmark markdown_to_html (Unsafe mode for HTML passthrough)
|
||||||
|
→ expand_emoji (post-cmark: :shortcode: → unicode, avoids cmark escape issues)
|
||||||
→ inject_sidenotes (post-cmark: [^id] → <label><input><span> markup)
|
→ inject_sidenotes (post-cmark: [^id] → <label><input><span> markup)
|
||||||
→ inject_alerts (post-cmark: [!TYPE] blockquotes → styled alerts)
|
→ inject_alerts (post-cmark: [!TYPE] blockquotes → styled alerts)
|
||||||
→ highlight_code (post-cmark: tree-sitter per code block, with error reporting)
|
→ highlight_code (post-cmark: tree-sitter per code block, with error reporting)
|
||||||
@@ -148,7 +149,6 @@ Extracted `template_process_tokens` from `template_eat_tokens` to separate ROOT
|
|||||||
|
|
||||||
- cmark allocates via C malloc, not the arena. HTML output leaks until process exit.
|
- cmark allocates via C malloc, not the arena. HTML output leaks until process exit.
|
||||||
- CSS/JS cache busting uses manual `?v=N` query params instead of content hashing.
|
- CSS/JS cache busting uses manual `?v=N` query params instead of content hashing.
|
||||||
- The `shrug` emoji has a backslash that may not display correctly.
|
|
||||||
- `json.Value` params require 64-byte aligned arena (workaround for `dynamic_arena_allocator_proc` ignoring per-allocation alignment).
|
- `json.Value` params require 64-byte aligned arena (workaround for `dynamic_arena_allocator_proc` ignoring per-allocation alignment).
|
||||||
- Tree-sitter grammar/query paths hardcoded in `tree_sitter.odin` (Nix store hashes, Helix-version-dependent).
|
- Tree-sitter grammar/query paths hardcoded in `tree_sitter.odin` (Nix store hashes, Helix-version-dependent).
|
||||||
- `TSQueryCapture` needs explicit `_padding: u32` field for C ABI compatibility (40-byte sizeof).
|
- `TSQueryCapture` needs explicit `_padding: u32` field for C ABI compatibility (40-byte sizeof).
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
- [ ] mustache data keys for opengraph, etc.
|
- [ ] mustache data keys for opengraph, etc.
|
||||||
- [ ] Block attributes on code fences (`{ #ex-1 }`) — hello-world.md
|
- [ ] Block attributes on code fences (`{ #ex-1 }`) — hello-world.md
|
||||||
- [x] Emoji shortcodes (`:shrug:` etc.) — 2 instances
|
- [x] Emoji shortcodes (`:shrug:` etc.) — 2 instances
|
||||||
- [ ] Backslash in shrug not visible.
|
- [x] Backslash in shrug not visible.
|
||||||
- [ ] include-code shortcode (`{{< include-code ... >}}`) — i-ported-fd-to-odin
|
- [ ] include-code shortcode (`{{< include-code ... >}}`) — i-ported-fd-to-odin
|
||||||
- [x] Nix build integration — main flake runs thor + tailwindcss instead of Hugo
|
- [x] Nix build integration — main flake runs thor + tailwindcss instead of Hugo
|
||||||
- [x] OpenGraph meta tags
|
- [x] OpenGraph meta tags
|
||||||
|
|||||||
+2
-2
@@ -182,9 +182,9 @@ load_page :: proc(
|
|||||||
if strings.has_suffix(file_path, ".html") {
|
if strings.has_suffix(file_path, ".html") {
|
||||||
page.body_html = strings.clone(body)
|
page.body_html = strings.clone(body)
|
||||||
} else {
|
} else {
|
||||||
expanded := expand_emoji(body)
|
clean_body, sn_defs, mn_defs := strip_definitions(body)
|
||||||
clean_body, sn_defs, mn_defs := strip_definitions(expanded)
|
|
||||||
html := cm.markdown_to_html_from_string(clean_body, {.Unsafe})
|
html := cm.markdown_to_html_from_string(clean_body, {.Unsafe})
|
||||||
|
html = expand_emoji(html)
|
||||||
html = highlight_code(inject_alerts(inject_notes(html, sn_defs, mn_defs)), file_path)
|
html = highlight_code(inject_alerts(inject_notes(html, sn_defs, mn_defs)), file_path)
|
||||||
if sectionate {
|
if sectionate {
|
||||||
html = wrap_sections(html)
|
html = wrap_sections(html)
|
||||||
|
|||||||
Reference in New Issue
Block a user