diff --git a/Tests/markdownTest.php b/Tests/markdownTest.php index d06becc..f9c5319 100644 --- a/Tests/markdownTest.php +++ b/Tests/markdownTest.php @@ -230,4 +230,21 @@ base"); $md = new markdown (); printf ($md->html ("")); } + + // Chaining + public function testChain1 () + { + $this->expectOutputString("

t1

t2

"); + $md = new markdown (); + printf ($md->html ("# t1\n## t2")); + } + + public function testChainCode1 () + { + + $this->expectOutputString("

+* OK
"); + $md = new markdown (); + printf ($md->html (" \n * OK")); + } } diff --git a/markdown.php b/markdown.php index 9867826..ed47d4e 100644 --- a/markdown.php +++ b/markdown.php @@ -155,6 +155,7 @@ class markdown $this->debugMKD ("DEBUT: Force type=CODE"); $type = "code"; $lineTxt = $line; + $indent = end ($indentStack); } else {