Skip to content

Commit 51dd3b2

Browse files
authored
Merge pull request #57 from sebix/fix-56
fix definition list parsing with empty definitions
2 parents 823bac5 + 064f07c commit 51dd3b2

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

CHANGELOG.textile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
h1. Textile Changelog
22

3+
h2. Version 2.3.17 (in development)
4+
* Bugfixes:
5+
** Empty definitions in definition lists raised an exception ("#56":https://github.com/textile/python-textile/issues/56)
6+
37
h2. Version 2.3.16
48
* Bugfixes:
59
** Fix processing of extended code blocks ("#50":https://github.com/textile/python-textile/issues/50)

tests/test_github_issues.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,8 @@ def test_github_issue_55():
252252
'interrupt();\n}\n}\n\nprotected final T getConfigs() {\n'
253253
'return configs;\n}\n}</pre>')
254254
assert result == expect
255+
256+
def test_issue_56():
257+
result = textile.textile("- :=\n-")
258+
expect = '<dl>\n</dl>'
259+
assert result == expect

textile/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,8 @@ def fRCList(self, match):
11871187
# parse the attributes and content
11881188
m = re.match(r'^[-]+({0})[ .](.*)$'.format(cls_re_s), line,
11891189
flags=re.M | re.S)
1190+
if not m:
1191+
continue
11901192

11911193
atts, content = m.groups()
11921194
# cleanup

0 commit comments

Comments
 (0)