Skip to content

A CAN note is stored using its AST

Rather than storing plain-text, a note in CAN will be stored using an abstract, semantic representation (an Abstract Syntax Tree). This allows both input and output to be extended easily to use different formats and also allows robust & simple internal tooling.

This will involve either:

  • designing & implementing a custom parser for an AST for notes
  • using an existing AST format, likely from a markdown parser

If a suitable parser exists already, development would move at a much faster pace at first while allowing full markdown support. It may need to be extended or modified in the future to allow for semantic note markup.

As I don't have much experience with markdown parsers in node (CAN will be built in node), I don't currently have enough information to make this decision. The first step is to collect a list of some popular markdown parsers for node/js.

And later:

as marked does not provide an AST and remark uses a wider community via unist, CAN will uses remark to process markdown input