mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
Fixed markdown parsing error particularly with the spoiler tag. (#2200)
This commit is contained in:
parent
069c2c787f
commit
c22358e0d2
1 changed files with 1 additions and 2 deletions
|
@ -63,10 +63,9 @@ const spoilerConfig = {
|
|||
|
||||
render: (tokens: any, idx: any) => {
|
||||
const m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/);
|
||||
const summary = mdToHtmlInline(md.utils.escapeHtml(m[1])).__html;
|
||||
|
||||
if (tokens[idx].nesting === 1) {
|
||||
// opening tag
|
||||
const summary = mdToHtmlInline(md.utils.escapeHtml(m[1])).__html;
|
||||
return `<details><summary> ${summary} </summary>\n`;
|
||||
} else {
|
||||
// closing tag
|
||||
|
|
Loading…
Reference in a new issue