vxml_pipeline/desugarers/sigil_counters_substitute__outside
Values
pub fn assertive_tests() -> testing.AssertiveTestCollection
pub fn constructor(outside: List(String)) -> core.Desugarer
Substitutes strings of the form
(::|..)(++|--|øø)<counterName>
inside text lines and attribute values outside configured forbidden subtrees by the string value of the counter, while incrementing/decrementing counters along the way.
Counter names must match [A-Za-z]+. A counter must have
been initialized by the time
it’s used or else a DesugaringError will occur.
Definitions are scoped to the element carrying the
definition: a child may shadow an inherited counter,
and the inherited value is restored on leaving the child.
Mutations to an unshadowed inherited counter remain visible.
Alphabetic and Roman counters require positive values. Unary counters require nonnegative values. Arabic counters may have any integer value. Alphabetic counters use the sequence A through Z, then AA, AB, and so forth.
Consecutive backslashes immediately before an expression escape it by parity. An odd number leaves the expression literal; an even number leaves it active. Each pair becomes one literal backslash. The escaping backslash is removed.
E.g., here is a correct use of a counter:
<> Chapter counter=SectionCounter <> Section number=::–SectionCounter
After the desugarer is run, this would become:
<> Chapter counter=SectionCounter <> Section number=-1
The second capturing group (++|–|øø) determines whether a counter is incremented, decremented, or kept equal at a point (according to its step size), whereas the first capturing group determines the string value of the counter is echoed ‘::’ or silenced ‘..’, i.e., inserted or not into the document at that point. In particular, a counter of the form
..øø<counterName>
has no effect on the document.