´ is preserved as the wrapper for both the paragraph
+ and its nested contents.
+!-->
+
@@ -424,6 +549,29 @@ This forms the “canonical” definition of the Les·M·L syntax;
+
+
+✠ `LesML:chunk´
+
+The `LesML:chunk´ template converts the provided list of lines into the
+ list of block elements that they represent.
+This comprises the following steps :—
+
+• Discovering the “last” lines of each block, which are nonempty lines
+ that are not followed by a nonempty line.
+
+• Collecting all of the lines in the block; i·e all lines since the
+ previous “last” line that are not empty.
+
+• Determining the level of the block and its sigils.
+
+• Passing the lines of the block, with any leading sigils removed, to
+ `LesML:expand-sigils´ to generate the actual block element.
+This also requires processing any paragraph‐type indicators and
+ stripping them if necessary to get the type of the underlying
+ paragraph.
+!-->
+
@@ -572,6 +720,19 @@ This forms the “canonical” definition of the Les·M·L syntax;
+
+
+✠ `LesML:paragraphize´
+
+The `LesML:paragraphize´ template first turns the provided lines into
+ blocks via `LesML:chunk´, arranges those blocks by applying templates
+ in the `LesML:blockify´ mode, then processes the inline contents of
+ those blocks by applying templates in the `LesML:inlinify´ mode.
+This does much of the processing for the body of a Les·M·L document,
+ altho some things, like footnote handling, can¦t be fully finalized
+ until later.
+!-->
+
@@ -581,6 +742,18 @@ This forms the “canonical” definition of the Les·M·L syntax;
+
+
+✠ `LesML:parse´
+
+The `LesML:parse´ template is the main entrypoint for Les·M·L handling,
+ taking a list of input lines and returning a series of resulting
+ Les·M·L documents.
+This template operates by outputting the result of the first document
+ in the provided lines, and then calling itself recursively with any
+ remaining documents until the lines are exhausted.
+!-->
+
@@ -817,6 +990,15 @@ This forms the “canonical” definition of the Les·M·L syntax;
+
+
+❦ Templates in the default mode
+
+This file provides a single template in the default mode: one which
+ matches H·T·M·L `