Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render the HTML of readmes and changelogs #781

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading