DelimiterRun
class DelimiterRun(val char: Char, val originalLength: Int, val canOpen: Boolean, val canClose: Boolean, var start: Int, var length: Int)
A run of identical emphasis delimiter characters, classified per CommonMark 0.31.2 section 6.2.
The run is mutable because the pairing algorithm consumes delimiters from its inner end: an opener loses its rightmost characters and a closer its leftmost. originalLength keeps the length as found, which is what the rule of three is defined on.
Parameters
char
the delimiter character
originalLength
length of the run as it was found
canOpen
whether the run may open emphasis
canClose
whether the run may close emphasis
start
index of the run's first remaining character
length
amount of remaining characters