fix: clean wikilinks and render latex in popover

This commit is contained in:
Jacky Zhao
2022-05-05 20:30:55 -04:00
parent 364aee36fc
commit b21b27d1d3
4 changed files with 31 additions and 19 deletions

View File

@ -39,6 +39,7 @@ const removeMarkdown = (
.replace(/\s{0,2}\[.*?\]: .*?$/g, '')
.replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? '$1' : '')
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1')
.replace(/!?\[\[\S[^\[\]\|]*(?:\|([^\[\]]*))?\S\]\]/g, '$1')
.replace(/^\s{0,3}>\s?/g, '')
.replace(/(^|\n)\s{0,3}>\s?/g, '\n\n')
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, '')