Skip to content

Commit

Permalink
Merge pull request #970 from hmrc/update
Browse files Browse the repository at this point in the history
Render vulnerability description markdown
  • Loading branch information
colin-lamed authored Dec 4, 2024
2 parents 6fb5d18 + 529c478 commit c87017f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import uk.gov.hmrc.cataloguefrontend.{routes => appRoutes}
@import uk.gov.hmrc.cataloguefrontend.connector.model.DependencyScope
@import uk.gov.hmrc.cataloguefrontend.dependency.DependencyExplorerController
@import uk.gov.hmrc.cataloguefrontend.util.MarkdownLoader
@import uk.gov.hmrc.cataloguefrontend.util.DateHelper._
@import uk.gov.hmrc.cataloguefrontend.vulnerabilities.VulnerabilitySummary

Expand All @@ -40,7 +41,10 @@
<dl class="row">
<p class="fw-bold">Description:</p>
<div class="overflow-x-hidden overflow-y-scroll" style="height: 140px;">
@vuln.distinctVulnerability.description
@MarkdownLoader.markdownFromString(vuln.distinctVulnerability.description) match {
case Right(s) => {@Html(s)}
case Left(_) => {@vuln.distinctVulnerability.description}
}
</div>
</dl>
</div>
Expand Down

0 comments on commit c87017f

Please sign in to comment.