vxml_pipeline/desugarers/substitute_counters
Values
pub fn assertive_tests() -> testing.AssertiveTestCollection
pub fn constructor() -> core.Desugarer
Substitutes strings of the form
(::|..)(++|--|øø)<counterName>
inside text lines and attribute values by string value of the counter, while incrementing/decrementing counters along the way.
The counter must have initialized by the time it’s used or else a DesugaringError will occur.
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 partuclar, a counter of the form
..øø<counterName>
has no effect on the document.