https://github.com/markdown-it/markdown-ast-spec
Markdown AST spec
https://github.com/markdown-it/markdown-ast-spec
Last synced: 5 months ago
JSON representation
Markdown AST spec
- Host: GitHub
- URL: https://github.com/markdown-it/markdown-ast-spec
- Owner: markdown-it
- Created: 2017-01-11T07:46:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T09:15:06.000Z (almost 9 years ago)
- Last Synced: 2025-07-07T19:40:35.275Z (5 months ago)
- Size: 1000 Bytes
- Stars: 6
- Watchers: 5
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Markdown AST spec
=================
Working draft to design lossless AST for markdown. Unstable.
Use [issues tracker](https://github.com/markdown-it/markdown-ast-spec/issues)
to discuss.
**Goals & checkpoints**:
1. 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.
2. Provide source mapping info.
3. Allow AST -> markdown write without formatting loss.
4. Performance:
- Additional care should be applied to fast AST build/traverse in Javascript.
5. Analyse required operation and recommend minimal set of API functions.
---
Useful to read:
- [csstree](https://github.com/csstree/csstree) - interesting approach to fast
tokenizer and other optimizations.
- [ESTree](https://github.com/estree/estree) - lossless JS AST design.
- [AST Explorer](http://astexplorer.net/) - explore different AST implementations.