Skip to main content

Module parse

Module parse 

Source
Expand description

Turns the text of one node file into a Node. Pure: takes a string, returns a value. Mirrors parse_node in reference/core.py and section 1 to 3 of spec/FORMAT.md.

Enums§

ParseError
Why a file could not be loaded. The spec names two of the four load errors here; the other two (filename mismatch, duplicate id) need the filename and the rest of the graph.

Functions§

node_from_map
Build a node from already-parsed frontmatter (a JSON map) and a body. Shared by the file parser and by anything that receives a node as JSON (the server, the editor).
parse_node
Parse the text of one node file.