Skip to main content

Module path

Module path 

Source
Expand description

The path grammar the engines share: segments with JSON Pointer escapes, ids and $labels, and block paths.

Enumsยง

BlockPart ๐Ÿ”’
What follows the root of a BlockPath.
BlockPath ๐Ÿ”’
A block path split into its parts, before its id or label is resolved.
ItemRef ๐Ÿ”’
How an id-or-label reference outside a path (from, to_page, reorder values) was written.

Functionsยง

escape_segment ๐Ÿ”’
segment JSON Pointer escaped, to put in a path; the inverse of unescape_segment.
is_course_root ๐Ÿ”’
Whether a pathโ€™s first segment names the course: course or the courseโ€™s id.
parse_block_path ๐Ÿ”’
Splits a block path into its parts; None when it doesnโ€™t start with /.
parse_item_ref ๐Ÿ”’
Parses pg7, /pg7, $x or /$x.
parse_uuid ๐Ÿ”’
Parses a path segment as an id. whole is the full path, quoted in the error.
split_path ๐Ÿ”’
The unescaped segments of a path; None when it doesnโ€™t start with /.
split_segment ๐Ÿ”’
The first segment of path (no leading /) and the rest, which starts with / or is empty.
unescape_segment ๐Ÿ”’
A path segment with its JSON Pointer escapes (~1 for /, ~0 for ~) undone.