Emphasis
class Emphasis extends AbstractPass
Properties
protected Parser | $parser | from AbstractPass | |
protected ParsedText | $text | from AbstractPass | |
protected bool | $closeEm | ||
protected bool | $closeStrong | ||
protected int | $emPos | ||
protected int | $emEndPos | ||
protected int | $remaining | ||
protected int | $strongPos | ||
protected int | $strongEndPos |
Methods
Parse the prepared text from stored parser
Adjust the ending position of current EM and STRONG spans
Adjust the starting position of current EM and STRONG spans
End current valid EM and STRONG spans
Parse emphasis and strong applied using given character
Get emphasis markup split by block
Test whether emphasis should be ignored at the given position in the text
Open EM and STRONG spans whose content starts at given position
Process a list of emphasis markup strings
Process an emphasis mark
Details
in
AbstractPass at line 29
__construct(Parser $parser, ParsedText $text)
No description
at line 50
void
parse()
Parse the prepared text from stored parser
at line 61
protected void
adjustEndingPositions()
Adjust the ending position of current EM and STRONG spans
at line 85
protected void
adjustStartingPositions()
Adjust the starting position of current EM and STRONG spans
If both EM and STRONG are set to start at the same position, we adjust their position to match the order they are closed. If they start and end at the same position, STRONG starts before EM to match Markdown's behaviour
at line 105
protected void
closeSpans()
End current valid EM and STRONG spans
at line 128
protected void
parseEmphasisByCharacter(string $character, string $regexp)
Parse emphasis and strong applied using given character
at line 149
protected array[]
getEmphasisByBlock(string $regexp, int $pos)
Get emphasis markup split by block
at line 187
protected bool
ignoreEmphasis(int $matchPos, int $matchLen)
Test whether emphasis should be ignored at the given position in the text
at line 199
protected void
openSpans(int $pos)
Open EM and STRONG spans whose content starts at given position
at line 217
protected void
processEmphasisBlock(array $block)
Process a list of emphasis markup strings
at line 234
protected void
processEmphasisMatch(int $matchPos, int $matchLen)
Process an emphasis mark