Skip to content

Commit a0abb80

Browse files
committed
fix issue #26
1 parent d6aa89f commit a0abb80

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_github_issues.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ def test_github_issue_22():
3535
result = textile.textile(text)
3636
expect = '\t<p><em class="artist-name">Ty Segall</em>’s</p>'
3737
assert result == expect
38+
39+
def test_github_issue_26():
40+
text = ''
41+
result = textile.textile(text)
42+
expect = ''
43+
assert result == expect

textile/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ def parse(self, text, rel=None, sanitize=False):
231231
self.unreferencedNotes = OrderedDict()
232232
self.notelist_cache = OrderedDict()
233233

234+
if text == '':
235+
return text
234236

235237
if self.restricted:
236238
text = encode_html(text, quotes=False)

0 commit comments

Comments
 (0)