Lady [Mon, 28 Apr 2025 01:55:06 +0000 (21:55 -0400)]
Support hgroups with heading continuations
These are a bit interesting because continuation paragraphs can be
placed ⹐before⹑ the heading they “continue” (not just after).
A block comment can be used to separate them from a preceding list or
similar.
Lady [Mon, 28 Apr 2025 00:42:16 +0000 (20:42 -0400)]
Quotes and brackets as multiparagraph divisions
This commit introduces a new concept of multiparagraph divisions (where
the lines within are re·analysed after the prefix is removed) and
transitions block quotations to it.
I resisted this for a long while because it¦s less “simple”, but the
precedent of preformatted text and the old quotation mechanism
(which was kind of messy) was already conceptually close.
And footer support really requires this.
Lady [Sun, 27 Apr 2025 05:21:13 +0000 (01:21 -0400)]
Drop langtags on offset text but support on paras
Now that language attributes can be arbitrarily added to any inline,
a special syntax for them doesn’t make much sense.
However, that syntax would be useful on block‐level elements.
There isn¦t a real technical reason for the explicit `$´ end of the
language tag, since the following whitespace could have been used to
end it also, but it makes the syntax a bit more obvious, matches the
existing format with the shebangs, and is less likely to conflict
with i·d syntaxes (which might include `@´ but probably won¦t also
end in a `$´).
You can still make i·d¦s like `@es$´ if you need by explicitly
language‐tagging: `¶@es$@en$´.
This commit also allows block sigils to not be followed by a space if
they are immediately followed by a pilcrow.
Lady [Sun, 27 Apr 2025 04:31:53 +0000 (00:31 -0400)]
Support attributes
This required a reworking of the link parsing code to enable it to also
be used for attribute parsing (more‐or‐less), and maybe also fixed a
bug where, if there was an end token with no start token, no further
end tokens would be processed (even later ones they did have start
tokens).
Lady [Sun, 27 Apr 2025 04:26:14 +0000 (00:26 -0400)]
Support inline comments
Comments work different from other inlines and have their own
processing rules.
“Empty” comments are useful primarily to break up spans of text into
discrete text nodes.
Lady [Sat, 26 Apr 2025 03:24:11 +0000 (23:24 -0400)]
Wrap results in a div
Even in the case where there is only one document, there may be
additional document comments which should be grouped alongside it and
not intermixed with any comments in the surrounding area.
For the case when there is only one document and nothing else, not
even a comment, it is probably better to still wrap the output for
consistency.
Lady [Sat, 26 Apr 2025 03:16:03 +0000 (23:16 -0400)]
Drop empty shebang documents
Previously, a shebang forced a document to be output, even if it was
empty.
However, this conflicts with the ability to add document comments at
the beginning of a document where the shebang is serving as a magic
number (for example, copyright comments):
This would create two documents, one for the shebang and a second one
for the final comment.
Now, empty documents will be dropped regardless of whether they use the
shebang or comment syntax.
Lady [Sat, 22 Mar 2025 01:45:20 +0000 (21:45 -0400)]
Enable nested tags of the same kind
Previously, the processing rules do not allow nesting an element inside
of itself: ‹ ☞︎nested ☞︎tags☜︎ like ☞︎this☜︎☜︎ › do not work as
expected.
This design choice was to (at least) appropriately handle
‹ ☞︎⟨this☜︎ weird ⟨case☜︎⟩ ›, where each inline should stop at the
first delimiter.
Correct processing starts by looking for end sigils first, not start
sigils, backtracking to the last start sigil which precedes it,
wrapping that text, and then reprocessing the entire set of nodes
until no more end sigils with matching start sigils are found.
This commit implements that behaviour, which is of course a fair bit
more complicated but should improve the results.
It also changes specifying characters by Unicode codepoint to use
curly braces rather than angle brackets, as the latter conflicted
with the angle brackets used in links.
Specifying by Unicode codepoint still isn¦t supported in links, but
the behaviour should be less surprising.
The old Unicode codepoint behaviour was probably broken also, in the
case where the codepoint was not the first character in a paragraph,
but it is fixed now.
Lady [Sat, 19 Oct 2024 17:11:12 +0000 (13:11 -0400)]
Refactor initial chunking to be line‐based
The old parsing mechanism operated primarily on large string chunks,
which were re‐parsed into lines potentially multiple times.
This refactor changes the parsing to use lines and ranges, which is a
little more verbose/complicated from an X·Path perspective (it
requires a lot of `generate-id()´ comparisons) but hopefully, on the
whole, better.
Lady [Sat, 19 Oct 2024 16:43:33 +0000 (12:43 -0400)]
Support language tag and profile
This commit provides initial support for language‐tagged Les·M·L
documents and additional document properties.
Only one property is supported: `profile´.
Language tags are themselves internally treated as properties whose
key contains spaces; property keys cannot ordinarily contain spaces
so there is no concern for confusion.
Lady [Sun, 12 May 2024 07:03:30 +0000 (03:03 -0400)]
Switch symbols for subsection and subsubsection
`❦´ is a stronger symbol than `✠´; its corresponding directional
fences `❧´ and `☙´ indicate section boundaries, while `⹐´ and `⹑´
simply enclose emphasis.