From: Lady Date: Sat, 19 Oct 2024 19:30:35 +0000 (-0400) Subject: Support multiple documents per file X-Git-Tag: 0.3.0~4 X-Git-Url: https://git.ladys.computer/LesML/commitdiff_plain/80c75b24c821e3d8a1d5d1a460304f8c8d35179c?ds=inline Support multiple documents per file Documents may begin with either `#!lesml` or `##`. --- diff --git a/README.markdown b/README.markdown index 7df7fde..406f611 100644 --- a/README.markdown +++ b/README.markdown @@ -43,6 +43,13 @@ Following the shebang line, document metadata may be provided in the The body of the document begins after the last line which begins with the string `%%`, or after the shebang line if none exists. +Multiple documents can be catenated into a single file; a new document + is begun on any line which starts with `#!lesml` or `##`. +Documents in the later case inherit the latest preceding `#!lesml` + declaration. +`##` may be followed by other text; this is treated as an interdocument + comment. + Documents are broken into paragraphs by blank lines. Empty paragraphs are ignored. Non·empty paragraphs are classified as follows :⁠— @@ -55,7 +62,6 @@ Non·empty paragraphs are classified as follows :⁠— | Character | Codepoint | Unicode Name | | --------- | --------- | ------------ | - | `#` | `U+0023` | `NUMBER SIGN` | | `*` | `U+002A` | `ASTERISK` | | `-` | `U+002D` | `HYPHEN-MINUS` | | `.` | `U+002E` | `FULL STOP` | diff --git a/parser.xslt b/parser.xslt index f1ade04..d35d53b 100644 --- a/parser.xslt +++ b/parser.xslt @@ -12,7 +12,7 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v 2 If a copy of the M·P·L was not distributed with this file, You can obtain one at . --> + ]> - @@ -141,120 +140,141 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - - - - - LANG - - - - - - - - - + + + + - + LANG - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +