diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 780761c..a43f3a7 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -650,6 +650,9 @@ def convert_pre(self, el, text, parent_tags): return '\n\n```%s\n%s\n```\n\n' % (code_language, text) + def convert_q(self, el, text, parent_tags): + return '"' + text + '"' + def convert_script(self, el, text, parent_tags): return '' diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 27951ee..6145411 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -305,6 +305,11 @@ def test_pre(): assert md("

foo

\n
bar
\n

baz

", sub_symbol="^") == "\n\nfoo\n\n```\nbar\n```\n\nbaz" +def test_q(): + assert md('foo quote bar') == 'foo "quote" bar' + assert md('foo quote bar') == 'foo "quote" bar' + + def test_script(): assert md('foo bar') == 'foo bar'