ftd::p1
grammarftd
is based on a low-level grammar called ftd::p1
grammar.section
ftd::p1
file is composed of “sections”. A section looks like this:ftd::p1
file with two sections-- some section: the caption of the section header-1: some header value hello: world the body of the first section -- something: yo: 42
Each section starts with --
.
The section has these properties:
section name
The section name is the only mandatory parameter for a section. Name starts
after --
, and ends with the first :
. Trailing :
is mandatory.
In our example, the name of the first section is some section
, and the second
section’s name is something
.
Section name contains alphanumeric characters, underscores, space, dots(.
),
hash(#
), and hyphens(-
). Colon terminates the section name.
Leading and trailing whitespaces are not considered part of the section name.
section caption
What comes after :
in the section line, till the end of the first line is called
the caption
of the section.
The caption
is optional.
In our example, the first section’s caption is “the caption of the section”, and the second section does not have a caption.
Leading and trailing whitespaces are not considered part of the caption.
section headers
After the “section line” (the first line that starts with --
, zero or more
section headers can be passed. In our example, the first section has two headers,
header-1
and hello
, with values some header value
and world
respectively.