mirror of
https://github.com/alrayyes/wiki.git
synced 2025-07-13 21:21:48 +00:00
fix inline link highlighting, safer latex render
This commit is contained in:
parent
e302f6c423
commit
ed9a8efd1f
3 changed files with 22 additions and 21 deletions
assets/js
|
@ -38,8 +38,8 @@ const removeMarkdown = (
|
|||
.replace(/(#{1,6})\s+(.+)\1?/g, '<b>$2</b>')
|
||||
.replace(/\s{0,2}\[.*?\]: .*?$/g, '')
|
||||
.replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? '$1' : '')
|
||||
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1')
|
||||
.replace(/!?\[\[\S[^\[\]\|]*(?:\|([^\[\]]*))?\S\]\]/g, '$1')
|
||||
.replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '<a>$1</a>')
|
||||
.replace(/!?\[\[\S[^\[\]\|]*(?:\|([^\[\]]*))?\S\]\]/g, '<a>$1</a>')
|
||||
.replace(/^\s{0,3}>\s?/g, '')
|
||||
.replace(/(^|\n)\s{0,3}>\s?/g, '\n\n')
|
||||
.replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue