Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion snakemd/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion tests/elements/test_quote.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down