Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsheep@ghostwheel <sheep@ghostwheel>2009-03-15 21:15:44 (GMT)
committer sheep@ghostwheel <sheep@ghostwheel>2009-03-15 21:15:44 (GMT)
commit435cfc4df45f4040e2da0ec6489f4d7f4d26ba00 (patch)
tree5a2d3e7ec59b378a25207442996f636438c995fa
parent3c4320990e35da851b5faac0b5efb06f74724689 (diff)
fix a bug in lists + test
-rwxr-xr-xhatta.py2
-rwxr-xr-xtest.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/hatta.py b/hatta.py
index 3d7075d..9206987 100755
--- a/hatta.py
+++ b/hatta.py
@@ -831,7 +831,7 @@ class WikiParser(object):
yield '<ul>'
level += 1
while nest < level:
- yield '</li></ul></li>'
+ yield '</li></ul>'
level -= 1
content = line.lstrip().lstrip('*').strip()
yield '<li>%s%s' % (
diff --git a/test.py b/test.py
index 3809f0f..3a843d2 100755
--- a/test.py
+++ b/test.py
@@ -145,6 +145,11 @@ u"""Here's a quote:
> Here is another //quote//:
>> A quote **within a quote
normal text""": u"""<p>Here's a quote:</p><blockquote>Here is another <i>quote</i>:<blockquote>A quote <b>within a quote</b></blockquote></blockquote><p>normal text</p>""",
+#--------------------------------------------------------------------
+u"""* sample list
+** sublist
+*** sub-sub-list with **bold
+* list""": u"""<ul><li>sample list<ul><li>sublist<ul><li>sub-sub-list with <b>bold</b></li></ul></li></ul><li>list</li></ul>""",
}
def test_test_cases(self):