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

Constructors

Link copied to clipboard
constructor(char: Char, originalLength: Int, canOpen: Boolean, canClose: Boolean, start: Int, length: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val char: Char
Link copied to clipboard
val end: Int

Index just past the run's last remaining character.

Link copied to clipboard

Whether the run is still on the delimiter stack. A run leaves the stack once it is fully consumed or once the algorithm decides it can never match.

Link copied to clipboard
var length: Int
Link copied to clipboard
Link copied to clipboard
var start: Int