Created
September 30, 2010 19:19
-
-
Save SeanJA/605148 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'classes/markdown.php'; | |
| $parser = new Markdown(); | |
| //Transform text using parser. | |
| echo $parser->transform($text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'classes/markdown.php'; | |
| class myMarkdown extends Markdown{ | |
| public function __invoke($text) { | |
| return $this->transform($text); | |
| } | |
| } | |
| $parser = new myMarkdown(); | |
| echo $parser($text); |
Author
Author
You don't actually need to do this with the markdown parser, it is already part of the code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not really sure what the advantage is here... it is kind of neat though