class Blocks extends AbstractPass

Properties

protected Parser $parser from  AbstractPass
protected ParsedText $text from  AbstractPass
protected array $setextLines

Methods

__construct(Parser $parser, ParsedText $text)

No description

void
parse()

Parse the prepared text from stored parser

void
closeList(array $list, int $textBoundary)

Close a list at given offset

int
computeBlockIgnoreLen(string $str, int $maxBlockDepth)

Compute the amount of text to ignore at the start of a block line

int
getAtxHeaderEndTagLen(int $startPos, int $endPos)

Return the length of the markup at the end of an ATX header

string[]
getBlockMarks(string $str)

Capture and return block marks from given string

void
matchSetextLines()

Capture and store lines that contain a Setext-tyle header

Details

in AbstractPass at line 29
__construct(Parser $parser, ParsedText $text)

No description

Parameters

Parser $parser
ParsedText $text

at line 22
void parse()

Parse the prepared text from stored parser

Return Value

void

at line 415
protected void closeList(array $list, int $textBoundary)

Close a list at given offset

Parameters

array $list
int $textBoundary

Return Value

void

at line 436
protected int computeBlockIgnoreLen(string $str, int $maxBlockDepth)

Compute the amount of text to ignore at the start of a block line

Parameters

string $str

Original block markup

int $maxBlockDepth

Maximum block depth

Return Value

int

Number of characters to ignore

at line 454
protected int getAtxHeaderEndTagLen(int $startPos, int $endPos)

Return the length of the markup at the end of an ATX header

Parameters

int $startPos

Start of the header's text

int $endPos

End of the header's text

Return Value

int

at line 468
protected string[] getBlockMarks(string $str)

Capture and return block marks from given string

Parameters

string $str

Block markup, composed of ">", "!" and whitespace

Return Value

string[]

at line 480
protected void matchSetextLines()

Capture and store lines that contain a Setext-tyle header

Return Value

void