Documentation

BacktickParser
in package
implements InlineParserInterface

FinalYes

Table of Contents

Interfaces

InlineParserInterface

Constants

MAX_BACKTICKS  = 1000
Max bound for backtick code span delimiters.

Properties

$lastCursor  : WeakReference<string|int, Cursor>|null
$lastCursorScanned  : bool
$seenBackticks  : array<int, int>

Methods

getMatchDefinition()  : InlineParserMatch
parse()  : bool
findMatchingTicks()  : bool
Locates the matching closer for a backtick code span.

Constants

Properties

$seenBackticks

private array<int, int> $seenBackticks = []

backtick count => position of known ender

Methods

findMatchingTicks()

Locates the matching closer for a backtick code span.

private findMatchingTicks(int $openTickLength, Cursor $cursor) : bool

Leverages some caching to avoid traversing the same cursor multiple times when we've already seen all the potential backtick closers.

Parameters
$openTickLength : int

Number of backticks in the opening sequence

$cursor : Cursor

Cursor to scan

Tags
see
https://github.com/commonmark/cmark/commit/8ed5c9d
Return values
bool

True if a matching closer was found, false otherwise


        
On this page

Search results