Why
Currently we are using syntect which unfortunately does not support some language (TypeScript, TSX, JSX etc). Am thinking of moving to a tree-sitter based highlighter and syntastica looks pretty promising.
What has been explored
So far, a SyntasticaAdapter has been created and upon testing the following works
- Rendering to HTML (requires 1 line change in example repo CSS)
- Syntax are way more accurate
- Has way more support for different languages
Problems
- Wasm module is bigger despite only importing rust for testing compared to syntect
- Performance is almost 100x slower, I tried using
Lazy but it did not improve performance. Am not sure what's the best way to do this with comrak
Why
Currently we are using syntect which unfortunately does not support some language (TypeScript, TSX, JSX etc). Am thinking of moving to a tree-sitter based highlighter and syntastica looks pretty promising.
What has been explored
So far, a SyntasticaAdapter has been created and upon testing the following works
Problems
Lazybut it did not improve performance. Am not sure what's the best way to do this with comrak