CAN will use remark to process markdown input¶
Remark provides an interface for producing, modifying and extending a markdown AST using itself and unist tooling. This should allow CAN to get off the ground and stay extensible over development.
Remark also provides a way to render both HTML and markdown from the AST, with the possibility to build renderers in the future that could be useful to a wider community.
Backlinks¶
- CAN notes are written in a subset of markdown
- Although CAN is able to parse and store full markdown (CAN will use remark to process input), to speed up development and avoid thinking through potential pitfalls of full markdown support until later CAN will use a subset of markdown for now.
- A CAN note is stored using its AST
- as marked does not provide an AST and remark uses a wider community via unist, CAN will uses remark to process markdown input
- CAN should parse the scratchfile when it is updated
- CAN should fire a SCRATCHFILE_PARSED event when the scratchfile is parsed. CAN should fire a SCRATCHFILE_ERROR event if unsupported syntax is found. This could be an error in the parsing step (CAN will use remark to process markdown) or markdown that CAN does not explicitly support - CAN notes are written in a subset of markdown. When a SCRATCHFILE_ERROR is emitted, CAN should inform the user
- Marked does not provide an AST
- After further research, I've found the unist project, which is a spec for syntax trees. Tied to this project is remark, a markdown processer which can provide a unist-compliant AST. Therefore, CAN will use remark to process markdown input