macana

Static site generator for Obsidian Vault

Syntax highlighting feature Though styles are almost nothing. It's too early to add styles. I considered - actually researched almost a day - tree-sitter for highlighting. However, the state of the ecosystem is not ready to use for web/WASM environment. * Some parsers use unexported C-API, which causes runtime panic. * Markdown parser requires block parsing -> inline parsing per blocks. * Generated parsers are large in general (e.g. TSX = ~3MB in WASM, ~5MB in `Uint8Array(JSON.parse("[0,...]"))` form). * Parser alone is barely usable: query, especially tailor made highlight query is needed for **each parsers**. (most of the parser I saw have "highlight.scm" but it seems to be for reference) While refractor requires additional tree-traversal for removing too generic classes, I believe this is way too efficient and reliable compare to tree-sitter (and its ecosystem) in its current state.

Changes

6 changed files (+431/-6)