@a-morphous/recital-ext-common-commands
v1.1.3
Published
Provides a set of tools that are useful when used alongside `stage-parser`.
Downloads
17
Readme
Common Commands Extension
Provides a set of tools that are useful when used alongside stage-parser
.
Most of the tools operate on the FlatObject[]
array that is generated by stage-parser
's genFlattenedObject
function.
List of Tools
convertWikiLinkToMd
Converts all the wiki links in a .stage file into valid Markdown links.
Wiki links have the format [[link]]
, and can also have an arrow to have text separate from the destination, e.g. [[This is the displayed text->destination]]
. This format is inspired directly from Chapbook's simple link format.
resolveIncludes
Parses a recital file for the $include
tag, which link to a separate .stage
file whose contents are inserted at the location of the original $include
command.
The include command's usage is:
$include <file to include> <raw?: boolean>
'raw' determines whether we process the included stage file for more includes, or just leave the text unprocessed.