Skip to content

CAN should parse the scratchfile when it is updated

In order to be able to store notes and use content-addressable storage, CAN needs to have access to the note's content. Because of this, CAN should parse the scratchfile whenever it is updated (CAN should fire a SCRATCHFILE_UPDATED event when the scratchfile is updated). Once the AST has been constructed, CAN should ignore 'beneath the fold'.

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