mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Merge pull request #593 from aidantwoods/enhancement/process
Decouple manipulating final AST from `text` method
This commit is contained in:
commit
68736f8800
@ -36,7 +36,13 @@ class Parsedown
|
||||
$lines = explode("\n", $text);
|
||||
|
||||
# iterate through lines to identify blocks
|
||||
$markup = $this->lines($lines);
|
||||
$Elements = $this->linesElements($lines);
|
||||
|
||||
# process elements
|
||||
$Elements = $this->process($Elements);
|
||||
|
||||
# convert to markup
|
||||
$markup = $this->elements($Elements);
|
||||
|
||||
# trim line breaks
|
||||
$markup = trim($markup, "\n");
|
||||
@ -1709,6 +1715,11 @@ class Parsedown
|
||||
return $markup;
|
||||
}
|
||||
|
||||
protected function process(array $Elements)
|
||||
{
|
||||
return $Elements;
|
||||
}
|
||||
|
||||
# ~
|
||||
|
||||
protected function li($lines)
|
||||
|
Loading…
Reference in New Issue
Block a user