Skip to content

Commit

Permalink
Pandoc: Markdown output can be one or the other (#89)
Browse files Browse the repository at this point in the history
Fixes #88
  • Loading branch information
moggers87 committed Dec 6, 2020
1 parent 934f682 commit d2a4a92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exhibition/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ def test_pandoc_filter(self):
)

def test_pandoc_filter_no_argument(self):
possible_markdown_outputs = [
"\nHello\n=====\n\nThis *is* **text**\n",
"\n# Hello\n\nThis *is* **text**\n",
]
meta = {"templates": []}
node = Node(mock.Mock(), None, meta=meta)
node.is_leaf = False
Expand All @@ -285,7 +289,7 @@ def test_pandoc_filter_no_argument(self):

node.meta["pandoc_config"] = {"format": "org", "to": "markdown"}
result = jinja_filter(node, PANDOC_TEMPLATE_WITHOUT_ARG)
self.assertEqual(result, "\nHello\n=====\n\nThis *is* **text**\n")
self.assertIn(result, possible_markdown_outputs)

def test_typogrify_filter(self):
node = Node(mock.Mock(), None, meta={"templates": []})
Expand Down

0 comments on commit d2a4a92

Please sign in to comment.