From 5e05dfca033d98e1f0e4a3458373eb666dfb98cb Mon Sep 17 00:00:00 2001 From: jrg94 <11050412+jrg94@users.noreply.github.com> Date: Sun, 12 Oct 2025 22:22:08 -0400 Subject: [PATCH 1/3] Converted lines into paragraphs before render --- snakemd/elements.py | 4 +++- tests/elements/test_quote.py | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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..a9c23c6 100644 --- a/tests/elements/test_quote.py +++ b/tests/elements/test_quote.py @@ -1,4 +1,5 @@ from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Raw +from snakemd.elements import Inline # Constructor tests @@ -41,6 +42,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 From 77cdd2e0d611a4f9cdf4cfcc02ffbab49e928b3a Mon Sep 17 00:00:00 2001 From: jrg94 <11050412+jrg94@users.noreply.github.com> Date: Sun, 12 Oct 2025 22:32:45 -0400 Subject: [PATCH 2/3] Cleaned import --- tests/elements/test_quote.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/elements/test_quote.py b/tests/elements/test_quote.py index a9c23c6..001b9a0 100644 --- a/tests/elements/test_quote.py +++ b/tests/elements/test_quote.py @@ -1,5 +1,4 @@ -from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Raw -from snakemd.elements import Inline +from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Inline # Constructor tests From a76978a6d65ffeed1564b1964dfc5949c707d789 Mon Sep 17 00:00:00 2001 From: jrg94 <11050412+jrg94@users.noreply.github.com> Date: Sun, 12 Oct 2025 22:34:53 -0400 Subject: [PATCH 3/3] I guess it's not unused --- tests/elements/test_quote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/elements/test_quote.py b/tests/elements/test_quote.py index 001b9a0..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, Inline +from snakemd import Code, Heading, HorizontalRule, MDList, Quote, Inline, Raw # Constructor tests