diff --git a/markdownify/__init__.py b/markdownify/__init__.py index ffde006..5bd492e 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -240,6 +240,12 @@ class MarkdownConverter(object): convert_em = abstract_inline_conversion(lambda self: self.options['strong_em_symbol']) + def convert_figcaption(self, el, text, convert_as_inline): + return "
%s
" % text + + def convert_figure(self, el, text, convert_as_inline): + return "
%s
" % text + convert_kbd = convert_code def convert_hn(self, n, el, text, convert_as_inline): diff --git a/tests/test_conversions.py b/tests/test_conversions.py index 86d8b5d..8afd589 100644 --- a/tests/test_conversions.py +++ b/tests/test_conversions.py @@ -39,6 +39,10 @@ def test_a_no_autolinks(): assert md('https://google.com', autolinks=False) == '[https://google.com](https://google.com)' +def test_a_containing_images(): + assert md('') == '[![](/path/to/img.jpg)](#)' + + def test_b(): assert md('Hello') == '**Hello**' @@ -84,6 +88,10 @@ def test_em(): inline_tests('em', '*') +def test_figure(): + assert md('
A
') == '
![](#)
A
' + + def test_h1(): assert md('

Hello

') == 'Hello\n=====\n\n'