feat(#3): Syntax highlighting & preview #9

Merged
ti-paul merged 1 commit from feature/3-syntax-preview into main 2026-06-12 02:11:38 +00:00
Member

Closes #3

New: src/preview.js

  • Multi-language tokenizer (JS/Python/Rust/Go)
  • ANSI terminal output with line numbers
  • HTML export with One Dark colors
  • vault show + vault preview commands

27 tests. 112 total pass.

Closes #3 ## New: src/preview.js - Multi-language tokenizer (JS/Python/Rust/Go) - ANSI terminal output with line numbers - HTML export with One Dark colors - vault show + vault preview commands 27 tests. **112 total pass.**
feat(#3): syntax highlighting & preview for snippets
Some checks failed
CI / test (pull_request) Failing after 0s
4215e7fc3f
New module src/preview.js:
- tokenizeLine: multi-language tokenizer (JS, Python, Rust, Go)
- highlight: ANSI-colored output with line numbers
- highlightHTML: HTML table output with One Dark theme colors
- renderPreview: full snippet preview with header/tags
- stripAnsi: clean text export

CLI integration:
- vault show <id> now shows syntax-highlighted code
- vault preview <id> renders full preview with borders

27 new tests. All 112 tests pass. Closes #3.
ti-paul left a comment
No description provided.
27 tests, 112 total. Clean tokenizer + ANSI highlighter. LGTM.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
les_clankeurs/snippet-vault!9
No description provided.