Copied!
  • internal
CloneableFinalInstantiable
Methods
public __construct(League\CommonMark\Environment\EnvironmentInterface $environment, League\CommonMark\Reference\ReferenceMapInterface $referenceMap)
public parse(string $contents, League\CommonMark\Node\Block\AbstractBlock $block) : void
Properties
private League\CommonMark\Environment\EnvironmentInterface $environment
 
  • psalm-readonly
private array $parsers = []
 
  • var array<int,\InlineParserInterface|string|bool>
  • psalm-var list<array{0: InlineParserInterface, 1: non-empty-string, 2: bool}>
  • phpstan-var array<int, array{0: InlineParserInterface, 1: non-empty-string, 2: bool}>
private League\CommonMark\Reference\ReferenceMapInterface $referenceMap
 
  • psalm-readonly
Methods
private addPlainText(string $text, League\CommonMark\Node\Block\AbstractBlock $container) : void
private matchParsers(string $contents) : array
 

Given the current line, ask all the parsers which parts of the text they would be interested in parsing.

The resulting array provides a list of character positions, which parsers are interested in trying to parse the text at those points, and (for convenience/optimization) what the matching text happened to be.

  • return array<int,\InlineParserInterface|string>[]
  • psalm-return array<int, list<array{0: InlineParserInterface, 1: non-empty-array}>>
  • phpstan-return array<int, array<int, array{0: InlineParserInterface, 1: non-empty-array}>>
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration