From 0b8eede15c728042a7fdea2e00d730f7245d2e2e Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 30 Jun 2014 14:33:09 +0000 Subject: [PATCH] markdown : BUG : in code, don't allow to have list. Just code ! git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1509 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- Tests/markdownTest.php | 17 +++++++++++++++++ markdown.php | 1 + 2 files changed, 18 insertions(+) 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 {