Changeset 1774
- Timestamp:
- 09/24/08 16:18:02 (2 months ago)
- Location:
- trunk/pylucid_project
- Files:
-
- 2 modified
-
PyLucid/system/markups/creole.py (modified) (1 diff)
-
tests/markup_creole.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid_project/PyLucid/system/markups/creole.py
r1771 r1774 521 521 def parse(self): 522 522 """Parse the text given as self.raw and return DOM tree.""" 523 self.parse_block(self.raw) 523 # convert all lineendings to \n 524 text = self.raw.replace("\r\n", "\n").replace("\r", "\n") 525 self.parse_block(text) 524 526 return self.root 525 527 -
trunk/pylucid_project/tests/markup_creole.py
r1771 r1774 87 87 out_string = self._parse("a text line.") 88 88 self.assertEqual(out_string, "<p>a text line.</p>\n") 89 90 def test_lineendings(self): 91 """ Test all existing lineending version """ 92 out_string = self._parse(u"first\nsecond") 93 self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 94 95 out_string = self._parse(u"first\rsecond") 96 self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 97 98 out_string = self._parse(u"first\r\nsecond") 99 self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 89 100 90 101 def test_creole_linebreak(self):
