Parser
class Parser extends ParserBase
Properties
protected array | $config | from ParserBase | |
protected Parser | $parser | from ParserBase |
Methods
void
parse(string $text, array $matches)
No description
void
linkifyUrl(int $tagPos, string $url)
Linkify given URL at given position
string
trimUrl(string $url)
Remove trailing punctuation from given URL
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 17
void
parse(string $text, array $matches)
No description
at line 33
protected void
linkifyUrl(int $tagPos, string $url)
Linkify given URL at given position
at line 72
protected string
trimUrl(string $url)
Remove trailing punctuation from given URL
We remove most ASCII non-letters and Unicode punctuation from the end of the string. Exceptions:
- dashes and underscores, (base64 IDs could end with one)
- equal signs, (because of "foo?bar=")
- plus signs, (used by some file share services to force download)
- trailing slashes,
- closing parentheses. (they are balanced separately)