mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
replace marked with markdown-it
This commit is contained in:
parent
53312b1520
commit
4a17c78a85
6 changed files with 146 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
|||
import 'jquery';
|
||||
import { marked } from 'marked';
|
||||
import markdownIt from 'markdown-it';
|
||||
import DOMPurify from 'dompurify';
|
||||
import loading from '../../../../components/loading/loading';
|
||||
import globalize from '../../../../scripts/globalize';
|
||||
|
@ -15,7 +15,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;">' + DOMPurify.sanitize(marked(version.changelog)) + '</div>';
|
||||
html += '<div style="margin-bottom:1.5em;">' + DOMPurify.sanitize(markdownIt().render(version.changelog)) + '</div>';
|
||||
}
|
||||
|
||||
$('#revisionHistory', page).html(html);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue