Skip to content

Commit

Permalink
Support multi-line changelog messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Dec 31, 2024
1 parent ed8e7ca commit 831d0ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion extension/pages/settings/changelog.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
}

#changelog .list > *:not(.subheader) {
margin-left: 20px;
margin-left: 32px;
}

#changelog .list .contributor > * {
margin-left: -12px;
}

#changelog .contributor a {
Expand Down
7 changes: 6 additions & 1 deletion extension/pages/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,15 @@ async function setupChangelog() {
});

for (const log of entry.logs[title]) {
let message;
if (typeof log.message === "string") message = log.message;
else if (typeof log.message === "object" && Array.isArray(log.message)) message = log.message.join("<br>");
else message = log.message.toString();

const child = document.newElement({
type: "div",
class: "contributor",
children: [document.newElement({ type: "span", text: log.message })],
children: [document.newElement({ type: "span", html: message })],
});

const contributor = contributors.filter((x) => x.key === log.contributor);
Expand Down

0 comments on commit 831d0ca

Please sign in to comment.