Skip to content

Commit 603cd07

Browse files
committed
fix #37
special thanks to @adam-iris which allowed me to rethink this issue.
1 parent da00f08 commit 603cd07

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

tests/test_github_issues.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ def test_github_issue_37():
9898
expect = '\t<p>\t<ol>\n\t\t<li>xxx</li>\n\t\t<li>yyy</li>\n\t</ol><br />\n<strong>blah</strong></p>'
9999
assert result == expect
100100

101+
text = '*Highlights*\n\n* UNITEK Y-3705A Type-C Universal DockingStation Pro\n* USB3.0/RJ45/EARPHONE/MICROPHONE/HDMI 6 PORT HUB 1.2m Data Cable 5V 4A Power Adaptor\n*\n* Dimensions: 25cm x 13cm x 9cm\n* Weight: 0.7kg'
102+
result = textile.textile(text)
103+
expect = '''\t<p><strong>Highlights</strong></p>
104+
105+
\t<ul>
106+
\t\t<li><span class="caps">UNITEK</span> Y-3705A Type-C Universal DockingStation Pro</li>
107+
\t\t<li>USB3.0/RJ45/EARPHONE/MICROPHONE/HDMI 6 <span class="caps">PORT</span> <span class="caps">HUB</span> 1.2m Data Cable 5V 4A Power Adaptor</li>
108+
\t</ul>
109+
*
110+
\t<ul>
111+
\t\t<li>Dimensions: 25cm x 13cm x 9cm</li>
112+
\t\t<li>Weight: 0.7kg</li>
113+
\t</ul>'''
114+
assert result == expect
115+
101116
def test_github_issue_40():
102117
text = '\r\n'
103118
result = textile.textile(text)

textile/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ def textileLists(self, text):
298298

299299
def fTextileList(self, match):
300300
text = re.split(r'\n(?=[*#;:])', match.group(), flags=re.M)
301-
# import pdb; pdb.set_trace()
302301
pt = ''
303302
result = []
304303
ls = OrderedDict()
@@ -315,7 +314,7 @@ def fTextileList(self, match):
315314
content = content.strip()
316315
else:
317316
result.append(line)
318-
break
317+
continue
319318

320319
nl = ''
321320
ltype = list_type(tl)

0 commit comments

Comments
 (0)