Skip to content

Commit 30d2663

Browse files
committed
new lines rendering is now closing to how it's on github. at least for Vue it's fixed
1 parent 53cd46f commit 30d2663

File tree

1 file changed

+2
-1
lines changed
  • server/api/changelog/releases/[provider]/[owner]

1 file changed

+2
-1
lines changed

server/api/changelog/releases/[provider]/[owner]/[repo].ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ async function getReleasesFromGithub(owner: string, repo: string) {
5050
const { html, toc } = render(r.markdown, r.id)
5151
return {
5252
id: r.id,
53-
html,
53+
// replace single \n within <p> like with Vue's releases
54+
html: html?.replace(/(?<!>)\n/g, '<br>') ?? null,
5455
title: r.name ?? r.tag,
5556
draft: r.draft,
5657
prerelease: r.prerelease,

0 commit comments

Comments
 (0)