Skip to content

Commit

Permalink
Merge pull request #1845 from 4dn-dcic/markdown_image
Browse files Browse the repository at this point in the history
Bug Fix - Pages are not correctly rendering MD image links
  • Loading branch information
utku-ozturk authored Sep 12, 2023
2 parents c1fe54a + 9274aa9 commit c113db4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ fourfront
Change Log
----------

6.4.1
=====

`Markdown image links in static sections and pages <https://github.com/4dn-dcic/fourfront/pull/1845>`_

* Bug fix - Markdown formatted static sections with images in hyperlinks are not correctly rendered if embedded in Pages. If the static section is rendered standalone, it works well.


6.4.0
=====

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "fourfront".
name = "encoded"
version = "6.4.0"
version = "6.4.1"
description = "4DN-DCIC Fourfront"
authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/encoded/static/components/static-pages/StaticPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const StaticEntryContent = React.memo(function StaticEntryContent(props){
} else if (typeof content === 'string' && filetype === 'txt' && content.slice(0,12) === 'placeholder:'){
// Deprecated older method - to be removed once data.4dn uses filetype=jsx everywhere w/ placeholder
renderedContent = replacePlaceholderString(content.slice(12).trim(), _.omit(props, 'className', 'section', 'content'));
} else if (content_as_html && typeof content_as_html === 'string' && filetype === 'rst'){
} else if (content_as_html && typeof content_as_html === 'string' && (filetype === 'rst' || filetype === 'md')){
renderedContent = replacePlaceholderString(content_as_html.trim(), _.omit(props, 'className', 'section', 'content', 'content_as_html'));
} else {
renderedContent = content;
Expand Down

0 comments on commit c113db4

Please sign in to comment.