Working draft to design lossless AST for markdown. Unstable.
Use issues tracker to discuss.
Goals & checkpoints:
- Allow support use cases, not available with current implementations. Examples:
- Optimize editor highlight update after text change.
- When user selects range at html page, provide range in source markdown doc.
- Better sync scroll for previews.
- Provide source mapping info.
- Allow AST -> markdown write without formatting loss.
- Performance:
- Additional care should be applied to fast AST build/traverse in Javascript.
- Analyse required operation and recommend minimal set of API functions.
Useful to read:
- csstree - interesting approach to fast tokenizer and other optimizations.
- ESTree - lossless JS AST design.
- AST Explorer - explore different AST implementations.