parser-parsedown: Add quick reference points in comments

This commit is contained in:
Starbeamrainbowlabs 2020-08-08 00:56:16 +01:00
parent 023829d41b
commit bbb3fc32ee
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 10 additions and 0 deletions

View File

@ -566,6 +566,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ █████ ██ ████ ██ ██████ ██ ███████ ██ ██ ██ ██ ██ ██ ███ * ██ █████ ██ ████ ██ ██████ ██ ███████ ██ ██ ██ ██ ██ ██ ███
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ████ ██████ * ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ████ ██████
* %templating
*/ */
/** /**
* Parses templating definitions. * Parses templating definitions.
@ -777,6 +778,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ ███████ █████ ██ █████ ██████ ██ ██ ███ * ██ ███████ █████ ██ █████ ██████ ██ ██ ███
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██ ███████ ██████ ██ ██ ██████ ██████ ██ ██ * ██████ ██ ██ ███████ ██████ ██ ██ ██████ ██████ ██ ██
* %checkbox
*/ */
protected function inlineCheckbox($fragment) { protected function inlineCheckbox($fragment) {
// We're not interested if it's not at the beginning of a line // We're not interested if it's not at the beginning of a line
@ -819,6 +821,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ █████ ███ ██ * ██ █████ ███ ██
* ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██
* ██ ███████ ██ ██ ██ * ██ ███████ ██ ██ ██
* %markedtext
*/ */
protected function inlineMark($fragment) { protected function inlineMark($fragment) {
// A question mark makes the PCRE 1-or-more + there lazy instead of greedy. // A question mark makes the PCRE 1-or-more + there lazy instead of greedy.
@ -855,6 +858,7 @@ class PeppermintParsedown extends ParsedownExtra
* ███████ ██ ██████ ██ ██████ ██ * ███████ ██ ██████ ██ ██████ ██
* ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██
* ██████ ██████ ██ ██ ██ ██ ██ * ██████ ██████ ██ ██ ██ ██ ██
* %subsuperscript
*/ */
protected function inlineSuperscript($fragment) { protected function inlineSuperscript($fragment) {
if(preg_match('/\^([^^]+?)\^/', $fragment["text"], $matches) !== 1) if(preg_match('/\^([^^]+?)\^/', $fragment["text"], $matches) !== 1)
@ -902,6 +906,7 @@ class PeppermintParsedown extends ParsedownExtra
* ███████ ██████ ██ ██ ██ ██ █████ ██████ * ███████ ██████ ██ ██ ██ ██ █████ ██████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██ ██████ ██ ███████ ███████ ██ ██ * ███████ ██ ██████ ██ ███████ ███████ ██ ██
* %spoiler
*/ */
protected function inlineSpoiler($fragment) { protected function inlineSpoiler($fragment) {
if(preg_match('/(?:\|\||>!)([^|]+?)(?:\|\||!<)/', $fragment["text"], $matches) !== 1) if(preg_match('/(?:\|\||>!)([^|]+?)(?:\|\||!<)/', $fragment["text"], $matches) !== 1)
@ -942,6 +947,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ ██ ██ ██ ██ █████ ███████ * ██ ██ ██ ██ ██ █████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██
* ███████ ██ ██ ████ ██ ██ ███████ * ███████ ██ ██ ████ ██ ██ ███████
* %internallinks
*/ */
/** /**
* Parses internal links * Parses internal links
@ -1058,6 +1064,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ ██ ████ ██ ███████ ██ ███ █████ ███████ * ██ ██ ████ ██ ███████ ██ ███ █████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ██ ██ ██ ██████ ███████ ███████ * ██ ██ ██ ██ ██ ██████ ███████ ███████
* %extendedimages
*/ */
/** /**
* Parses the extended image syntax. * Parses the extended image syntax.
@ -1272,6 +1279,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ ██ ██████ ██ ███ ██████ ███████ ██ ██ █████ * ██ ██ ██████ ██ ███ ██████ ███████ ██ ██ █████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██████ ██ ██ ██ ██ ██████ ███████ * ██████ ██ ██████ ██ ██ ██ ██ ██████ ███████
* %codeblockupgrade
*/ */
protected function blockFencedCodeComplete($block) { protected function blockFencedCodeComplete($block) {
@ -1309,6 +1317,7 @@ class PeppermintParsedown extends ParsedownExtra
* ███████ █████ ███████ ██ ██ █████ ██████ * ███████ █████ ███████ ██ ██ █████ ██████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██ ██ ███████ ██ ██ ██████ ███████ ██ ██ * ██ ██ ███████ ██ ██ ██████ ███████ ██ ██
* %header %toc
*/ */
private $headingIdsUsed = []; private $headingIdsUsed = [];
@ -1485,6 +1494,7 @@ class PeppermintParsedown extends ParsedownExtra
* ██ ██ ██ ██ ██ ██ ██ ██ █████ ███████ * ██ ██ ██ ██ ██ ██ ██ ██ █████ ███████
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
* ██████ ██ ██ ███████ ██ ██ ██ ███████ ███████ * ██████ ██ ██ ███████ ██ ██ ██ ███████ ███████
* %utilities
*/ */
/** /**