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,6 +1,6 @@
|
|||
import { intervalToDuration } from 'date-fns';
|
||||
import DOMPurify from 'dompurify';
|
||||
import { marked } from 'marked';
|
||||
import markdownIt from 'markdown-it';
|
||||
import escapeHtml from 'escape-html';
|
||||
import isEqual from 'lodash-es/isEqual';
|
||||
|
||||
|
@ -859,7 +859,7 @@ function renderOverview(page, item) {
|
|||
const overviewElements = page.querySelectorAll('.overview');
|
||||
|
||||
if (overviewElements.length > 0) {
|
||||
const overview = DOMPurify.sanitize(marked(item.Overview || ''));
|
||||
const overview = DOMPurify.sanitize(markdownIt().render(item.Overview || ''));
|
||||
|
||||
if (overview) {
|
||||
for (const overviewElemnt of overviewElements) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue