diff --git a/snakemd/elements.py b/snakemd/elements.py index 5dbd32e..2a1d8d7 100644 --- a/snakemd/elements.py +++ b/snakemd/elements.py @@ -1325,8 +1325,10 @@ def _process_content(lines) -> list[Block]: else: processed_lines = [] for line in lines: - if isinstance(line, (str, Inline)): + if isinstance(line, str): processed_lines.append(Raw(line)) + elif isinstance(line, Inline): + processed_lines.append(Paragraph([line])) else: processed_lines.append(line) logger.debug("Processed quote lines: %r", processed_lines) diff --git a/tests/elements/test_quote.py b/tests/elements/test_quote.py index 2f32518..33c6ce4 100644 --- a/tests/elements/test_quote.py +++ b/tests/elements/test_quote.py @@ -1,4 +1,4 @@ -from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Raw +from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Inline, Raw # Constructor tests @@ -41,6 +41,11 @@ def test_quote_hr(): def test_quote_mdlist(): quote = Quote([MDList(["How", "Now", "Brown"])]) assert str(quote) == "> - How\n> - Now\n> - Brown" + + +def test_quote_inline(): + quote = Quote(["[!NOTE]", Inline("...", bold=True)]) + assert str(quote) == "> [!NOTE]\n> **...**" # Method tests