Created
May 7, 2016 17:54
-
-
Save cebe/615bef8086c9a11d81f568284c18fec5 to your computer and use it in GitHub Desktop.
Demo for demonstrating maximum nesting level in markdown parser.
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
{ | |
"require": { | |
"league/commonmark": "^0.13.2" | |
} | |
} |
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 | |
use League\CommonMark\CommonMarkConverter; | |
require(__DIR__ . '/vendor/autoload.php'); | |
// in case you have xdebug extension, you do not | |
// have this check in production, so we set it really high | |
ini_set('xdebug.max_nesting_level', 100000); | |
$converter = new CommonMarkConverter(); | |
echo $converter->convertToHtml(str_repeat('> ', 10000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment