Skip to content

Spintax 1.3.1

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Aug 11:25
· 1 commit to main since this release

Follow-up to 1.3.0, from a review of that release against the engine.

Fixed

  • Separators containing balanced braces came back. 1.3.0 rejected any
    trailing-separator candidate holding {, }, [ or ], which was too
    strong: the engine counts them (signed counters in TrailingSepLength) and
    only gives up on a TOP-LEVEL | or an unbalanced closer. So [a<{, | and }>|b]
    is one separator, pipe and all — 1.3.0 painted it as a live nested enumeration
    and showed three options where the engine renders two. This was a regression
    against 1.2.0, which accepted it. One nesting level is now matched; deeper
    nesting inside a separator is left as text.
  • A <tag> after a permutation config is content again. The config context
    popped back to the start of the permutation, where the leading-separator rule
    could fire a second time, so the <b> in [<sep=", "> <b>bold|plain] was
    painted as a separator. The engine parses a config exactly once per [.
  • Trailing-separator HTML guards now trim first, like the engine's SepTrim.
    [a< span class="x" >|b] and [a< br/ >|b] are content, not separators;
    1.3.0 tested for the leading /, the trailing / and the tag-name-plus-space
    shape at the character right after <, so a single blank slipped every guard.
  • {plural a{b: forms} is a plural. The head lookahead excluded {, but
    PluralHeadLength stops only at :, | and }.

Changed

  • The comment heuristic is unchanged; what it claims is not. 1.3.0 said its
    residual errors only ever under-claim, and that is wrong in both directions:
    a /# at the start of a line with no #/ anywhere still greys the rest of
    the document, and a /# glued to text whose #/ lands on a later line is a
    comment to the engine but plain text here — so an unbalanced brace inside such
    an annotation opens a construct that runs to end of file. Both need the whole
    document to answer, which is a plugin's job rather than a grammar's. The
    grammar header, the README and this file now say so.
  • The comment opener's lookahead is lazy, so a /# whose #/ is nearby stops
    there instead of scanning to the end of what may be a very long single line.

Documentation

  • Tests cover the cases the review found unpinned: nested conditionals and
    plurals (the depth suffixes at levels 2–4, which no test reached), #include
    separated by a literal VT and by a FF, and each of the separator shapes above.