diff --git a/lammpsdoc/txt2rst.py b/lammpsdoc/txt2rst.py index b4e8d63..e87f5be 100755 --- a/lammpsdoc/txt2rst.py +++ b/lammpsdoc/txt2rst.py @@ -114,6 +114,7 @@ class RSTMarkup(Markup): return "`%s <%s>`_" % (content, href) + class RSTFormatting(Formatting): RST_HEADER_TYPES = '#*=-^"' diff --git a/tests/test_txt2rst.py b/tests/test_txt2rst.py index e9b66d4..d6a5cb5 100644 --- a/tests/test_txt2rst.py +++ b/tests/test_txt2rst.py @@ -159,13 +159,13 @@ class TestFormatting(unittest.TestCase): def test_preformat_formatting(self): s = self.txt2rst.convert("Hello :pre\n") - self.assertEqual(".. parsed-literal::\n\n" + self.assertEqual("\n.. parsed-literal::\n\n" " Hello\n\n", s) def test_preformat_formatting_with_indentation(self): s = self.txt2rst.convert(" Hello\n" " World :pre\n") - self.assertEqual(".. parsed-literal::\n\n" + self.assertEqual("\n.. parsed-literal::\n\n" " Hello\n" " World\n\n", s)