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
Backlinks¶
- CAN should fire a SCRATCHFILE_ERROR event if unsupported syntax is found
- CAN should parse the scratchfile when it is updated. If CAN hits an error in the scratchfile or finds unsupported syntax (CAN uses a subset of markdown), it should fire a SCRATCHFILE_ERROR event with the error passed as an argument. To allow other parts of the software to respond.
- CAN should fire a SCRATCHFILE_PARSED event when the scratchfile is parsed
- CAN should parse the scratchfile once it has been updated. Once CAN has successfully parsed the scratchfile, the SCRATCHFILE_PARSED event should be fired, with the AST included as an argument. To allow other parts of the software to respond.