0.6.0 — Full AST engine
Highlights
Replaces the regex-driven Markdown engine with a full AST pipeline — parsing, tokenizing, and styling now run off a real syntax tree instead of re-scanning the whole document with NSRegularExpression on every keystroke.
Main changes
- Two-phase AST parse —
BlockParsersplits the document into a gap-free sequence of blocks; each block's inline content is parsed byInlineParserinto aDocumentAST(BlockNodes with inline children). - Tables & block LaTeX as first-class AST blocks — with a table-cell scanner that reuses the inline parser, instead of regex detection.
- AST visitor styler — block paragraph styles, inline colouring, and caret-aware marker reveal/shrink all derive from the tree; this is the live styler now, not the old regex passes.
- Scanners instead of regex — block-level tokens come from hand-written scanners; the structural regexes in the tokenizer and styler are gone.
- Incremental parsing & tokenization — per keystroke only the edited block window is re-parsed/re-tokenized (prefix/suffix reuse + buffer
memcmpcache, wiki-link fast path), so editing cost is ≈ O(edit) instead of O(document).
Bundled fixes
Heading marker spacing & nested-marker reveal, task-checkbox glyph, file-switch scroll oscillation, incomplete code fences staying visible while typing, and trailing-image scroll/measurement.
Tests
swift test — 61 tests across the AST parser, styler, and end-to-end pipeline suites.
Full changelog: 0.5.1...0.6.0
What's Changed
- implement full AST instead of regex by @luca-chen198 in #52
Full Changelog: 0.5.1...0.6.0