Parser
class Parser extends ParserBase
Properties
protected array | $config | from ParserBase | |
protected Parser | $parser | from ParserBase | |
protected bool | $hasDoubleQuote | ||
protected bool | $hasSingleQuote | ||
protected string | $text |
Methods
No description
Parse dashes and ellipses
Parse pairs of double quotes
Parse vulgar fractions
Parse guillemets-style quotation marks
Parse the not equal sign
Parse pairs of quotes
Parse pairs of single quotes
Parse single quotes in general
Parse symbols found after digits
Parse symbols found in parentheses such as (c)
Details
in
ParserBase at line 30
final
__construct(Parser $parser, array $config)
Constructor
in
ParserBase at line 43
protected void
setUp()
Plugin's setup
at line 32
void
parse(string $text, array $matches)
No description
at line 75
protected Tag
addTag(int $tagPos, int $tagLen, string $chr, int $prio = 0)
Add a fancy replacement tag
at line 90
protected void
parseDashesAndEllipses()
Parse dashes and ellipses
Does en dash –, em dash — and ellipsis …
at line 117
protected void
parseDoubleQuotePairs()
Parse pairs of double quotes
Does quote pairs “” -- must be done separately to handle nesting
at line 134
protected void
parseFractions()
Parse vulgar fractions
at line 176
protected void
parseGuillemets()
Parse guillemets-style quotation marks
at line 201
protected void
parseNotEqualSign()
Parse the not equal sign
Supports != and =/=
at line 224
protected void
parseQuotePairs(string $regexp, string $leftQuote, string $rightQuote)
Parse pairs of quotes
at line 245
protected void
parseSingleQuotePairs()
Parse pairs of single quotes
Does quote pairs ‘’ must be done separately to handle nesting
at line 264
protected void
parseSingleQuotes()
Parse single quotes in general
Does apostrophes ’ after a letter or at the beginning of a word or a couple of digits
at line 290
protected void
parseSymbolsAfterDigits()
Parse symbols found after digits
Does symbols found after a digit:
- apostrophe ’ if it's followed by an "s" as in 80's
- prime ′ and double prime ″
- multiply sign × if it's followed by an optional space and another digit
at line 335
protected void
parseSymbolsInParentheses()
Parse symbols found in parentheses such as (c)
Does symbols ©, ® and ™