Skip to content

Commit

Permalink
Render the HTML of readmes and changelogs (#781)
Browse files Browse the repository at this point in the history
* Render the HTML of readmes and changelogs

* Add changelog entry
  • Loading branch information
tchoutri authored Nov 5, 2024
1 parent 4d10b5e commit ed7ac39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog.d/781
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
synopsis: Render the HTML of READMEs and Changelogs
description: {
There was a regression, likely due to the switch to lucid2, that escaped the HTML from READMEs and Changelogs
}
prs: #781
4 changes: 2 additions & 2 deletions src/web/FloraWeb/Pages/Templates/Packages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ showChangelog namespace packageName version mChangelog = div_ [class_ "container
section_ [class_ "release-changelog"] $ do
case mChangelog of
Nothing -> toHtml @Text "This release does not have a Changelog"
Just changelogText -> toHtml changelogText
Just changelogText -> toHtmlRaw changelogText

displayReleaseVersion :: Version -> FloraHTML
displayReleaseVersion = toHtml
Expand Down Expand Up @@ -306,7 +306,7 @@ displayReadme :: Release -> FloraHTML
displayReadme release =
case readme release of
Nothing -> renderHaddock release.description
Just readme -> toHtml readme
Just readme -> toHtmlRaw readme

displayVersions :: Namespace -> PackageName -> Vector Release -> Word -> FloraHTML
displayVersions namespace packageName versions numberOfReleases =
Expand Down

0 comments on commit ed7ac39

Please sign in to comment.