mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
(blog) change boundary checks for spoiler syntax, as it may be adjacent to a html tag (which is not a whitespace)
This commit is contained in:
parent
ed73460849
commit
b2f0b9da82
@ -143,7 +143,7 @@ export default async function parseMarkdown(markdown: string, translator: Transl
|
||||
.replace(/<p>{wide_table}<\/p>/g, '<div class="table-wide table-responsive my-5 headers-nowrap">')
|
||||
.replace(/<p>{\/wide_table}<\/p>/g, '</div>')
|
||||
.replace(/<p>{gallery={(.*?)}}<\/p>/gms, generateGallery)
|
||||
.replace(/(?<=\s|^)!!(.*?)!!(?=\s|$)/gms, (_: string, spoilerString: string): string => {
|
||||
.replace(/(?<![\w!])!!(.*?)!!(?![\w!])/gs, (_: string, spoilerString: string): string => {
|
||||
return `<span class="spoiler">${spoilerString}</span>`;
|
||||
})
|
||||
}</div>`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user