From 8ec16757e4e148132ca03a76691e3b158bf6b2f3 Mon Sep 17 00:00:00 2001 From: Luna D Date: Thu, 23 Sep 2021 15:51:09 +0200 Subject: [PATCH] preserve textile newlines --- lib/philomena/textile/parser_markdown.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/philomena/textile/parser_markdown.ex b/lib/philomena/textile/parser_markdown.ex index 85ce26fe..463a197f 100644 --- a/lib/philomena/textile/parser_markdown.ex +++ b/lib/philomena/textile/parser_markdown.ex @@ -509,13 +509,14 @@ defmodule Philomena.Textile.ParserMarkdown do {:ok, [{:markup, "\n" <> String.duplicate("> ", level)}], r_tokens} end + #   defp block_textile_element(_parser, [{:double_newline, _} | r_tokens], level) when level == 0 do - {:ok, [{:markup, "\n\n"}], r_tokens} + {:ok, [{:markup, "\n\u00a0\n"}], r_tokens} end defp block_textile_element(_parser, [{:newline, _} | r_tokens], level) when level == 0 do - {:ok, [{:markup, "\n"}], r_tokens} + {:ok, [{:markup, "\u00a0\n"}], r_tokens} end defp block_textile_element(parser, tokens, level) do