mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/js/markdown: fix processing of inline markdown
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
import { marked } from "marked";
|
||||
const marked = require("marked");
|
||||
const DOMPurify = require("dompurify");
|
||||
|
||||
class BaseMarkdownWrapper {
|
||||
@ -159,7 +159,7 @@ function formatMarkdown(text) {
|
||||
for (let wrapper of wrappers) {
|
||||
text = wrapper.preprocess(text);
|
||||
}
|
||||
text = marked(text, options);
|
||||
text = marked.parse(text, options);
|
||||
wrappers.reverse();
|
||||
for (let wrapper of wrappers) {
|
||||
text = wrapper.postprocess(text);
|
||||
@ -185,7 +185,7 @@ function formatInlineMarkdown(text) {
|
||||
for (let wrapper of wrappers) {
|
||||
text = wrapper.preprocess(text);
|
||||
}
|
||||
text = marked.inlineLexer(text, [], options);
|
||||
text = marked.parseInline(text, options);
|
||||
wrappers.reverse();
|
||||
for (let wrapper of wrappers) {
|
||||
text = wrapper.postprocess(text);
|
||||
|
Reference in New Issue
Block a user