Parser

Section parser of a project's Yarner.toml contains all configuration options for Yarner's syntax within Markdown sources.

Overview

The default parser section as generated by yarner init looks like this (comments removed):

[parser]

fence_sequence = "```"
fence_sequence_alt = "~~~"

block_name_prefix = "//-"

macro_start = "// ==>"
macro_end = "."

transclusion_start = "@{{"
transclusion_end = "}}"

link_prefix = "@"

file_prefix = "file:"
hidden_prefix = "hidden:"

Options

OptionDetails
fence_sequenceThe sequence used for normal code blocks
fence_sequence_altAlternative fence sequence to allow for code blocks inside code blocks. Use this for the outer block
block_name_prefixPrefix sequence to indicate a block's name in the first line of a code block
macro_start macro_endStart and end of a macro invocation
transclusion_start transclusion_endStart and end of a transclusion. E.g. @{{transclude.md}}
link_prefixPrefix for links to make Yarner include the linked file in the build process. E.g. @[Linked file](linked.md)
file_prefixPrefix to treat block names as target file specifiers. E.g. //- file:main.rs
hidden_prefixPrefix to hide a code block in documentation output. E.g. //- hidden:Secret code block