From 5b4ce257c76204a0183ff840f04e5a5013c997d0 Mon Sep 17 00:00:00 2001 From: utku-ozturk Date: Tue, 26 Sep 2023 11:21:09 +0300 Subject: [PATCH 1/3] fix md code rendering --- src/encoded/types/user_content.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/encoded/types/user_content.py b/src/encoded/types/user_content.py index 8155baff7f..8f1d79a5ee 100644 --- a/src/encoded/types/user_content.py +++ b/src/encoded/types/user_content.py @@ -159,7 +159,7 @@ def content_as_html(self, request, body=None, file=None, options=None): elif file_type == 'md': # remove new line character output = convert_markdown_to_html(content) - output = output.replace('\n', '') + # output = output.replace('\n', '') if output and convert_ext_links: return convert_external_links(output, request.domain) return output @@ -350,7 +350,7 @@ def get_remote_file_contents(uri): def convert_markdown_to_html(markdown_text, custom_wrapper = 'div'): # convert markdown to html including tables - html_output = markdown.markdown(markdown_text, extensions=['tables']) + html_output = markdown.markdown(markdown_text, extensions=['tables', 'fenced_code']) # check content has any header, if yes wrap it with custom tag header_pattern = re.compile(r'.*?<\/h[1-6]>', re.IGNORECASE) From b1253d233e21fe11bcc279d5ae77990b2cfb68de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20Utku=20=C3=96zt=C3=BCrk?= <49978017+utku-ozturk@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:21:19 +0300 Subject: [PATCH 2/3] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e6ba2f9047..562f00584f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] # Note: Various modules refer to this system as "encoded", not "fourfront". name = "encoded" -version = "6.4.4" +version = "6.4.5" description = "4DN-DCIC Fourfront" authors = ["4DN-DCIC Team "] license = "MIT" From 339c811c316d6ebdc586753a1aeca65c0e3f34b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serkan=20Utku=20=C3=96zt=C3=BCrk?= <49978017+utku-ozturk@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:24:08 +0300 Subject: [PATCH 3/3] Update CHANGELOG.rst --- CHANGELOG.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7c9fbefe23..589e2323d2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,14 @@ fourfront Change Log ---------- +6.4.5 +===== + +`Bug fix - markdown json content in static sections `_ + +* Json code sections in markdowns static content is not correctly rendered + + 6.4.4 =====