Merge pull request #2740 from MrTimscampi/changelog-newline

Replace newlines in plugin changelogs with the proper HTML tag
This commit is contained in:
Bill Thornton 2021-06-15 09:46:34 -04:00 committed by GitHub
commit c7b05ba130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ function populateHistory(packageInfo, page) {
for (let i = 0; i < length; i++) {
const version = packageInfo.versions[i];
html += '<h2 style="margin:.5em 0;">' + version.version + '</h2>';
html += '<div style="margin-bottom:1.5em;">' + version.changelog + '</div>';
html += '<div style="margin-bottom:1.5em;">' + version.changelog.replace(/(?:\r\n|\r|\n)/g, '<br>') + '</div>';
}
$('#revisionHistory', page).html(html);