1
0
mirror of https://github.com/makeworld-the-better-one/md2gemini synced 2025-04-09 22:39:04 +02:00

Add newline between quote and next paragraph

Fixes #31
This commit is contained in:
makeworld 2021-12-08 11:53:26 -05:00
parent 1bcd5e7834
commit 93a3245fbc
2 changed files with 22 additions and 2 deletions

@ -308,8 +308,10 @@ class GeminiRenderer(
)
ret = ""
for line in lines:
ret += "> " + line.strip() + NEWLINE
return ret
ret += (
"> " + line.strip() + LINEBREAK
) # Linebreak used to prevent removal later
return PARAGRAPH_DELIM + ret + PARAGRAPH_DELIM
def block_html(self, html):
if self.strip_html:

@ -36,3 +36,21 @@ def test_quote_with_hard_linebreaks():
""".strip()
assert f(md) == gem
def test_quote_with_text_after():
# https://github.com/makeworld-the-better-one/md2gemini/issues/31
md = """
> some quote
More text
"""
gem = """
> some quote
More text
""".strip()
assert f(md) == gem