File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def run(self, lines):
65
65
""" Parse Meta-Data and store in Markdown.Meta. """
66
66
meta = {}
67
67
key = None
68
- while 1 :
68
+ while lines :
69
69
line = lines .pop (0 )
70
70
if line .strip () == '' :
71
71
break # blank line - done
Original file line number Diff line number Diff line change @@ -297,6 +297,13 @@ def testMissingMetaData(self):
297
297
'</code></pre>' )
298
298
self .assertEqual (self .md .Meta , {})
299
299
300
+ def testMetaDataWithoutNewline (self ):
301
+ """ Test doocument with only metadata and no newline at end."""
302
+ text = 'title: No newline'
303
+ self .assertEqual (self .md .convert (text ), '' )
304
+ self .assertEqual (self .md .Meta , {'title' : ['No newline' ]})
305
+
306
+
300
307
class TestWikiLinks (unittest .TestCase ):
301
308
""" Test Wikilinks Extension. """
302
309
You can’t perform that action at this time.
0 commit comments