Nvim Regex by @Rongzhou
Appearance
Tag: Manual revert |
wikitext |
||
| Line 21: | Line 21: | ||
<syntaxhighlight lang="text" copy> | <syntaxhighlight lang="text" copy> | ||
:%s/\$\$\(\_.\{-}\)\$\$\|\$\(.\{-}\)\$/\=submatch(0) =~ '^\$\$' ? '\['.submatch(1).'\]' : '\('.submatch(2).'\)'/g | :%s/\$\$\(\_.\{-}\)\$\$\|\$\(.\{-}\)\$/\=submatch(0) =~ '^\$\$' ? '\['.submatch(1).'\]' : '\('.submatch(2).'\)'/g | ||
</syntaxhighlight> | |||
== Wikitext == | |||
<syntaxhighlight ... inline></syntaxhighlight> > <code></code>: | |||
<syntaxhighlight lang="text" copy> | |||
:%s#<syntaxhighlight[^>]*inline>\(.\{-}\)</syntaxhighlight>#<code>\1</code>#g | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 20:38, 29 September 2026
Markdown /md
Text <> list
:%s#^#- #
:%s#^- ##
Katex
\[ \( <> $$ $ separator change:
:%s/\(\\(\(.\{-}\)\\)\)\|\(\\\[\(\_.\{-}\)\\\]\)/\=submatch(1) != '' ? '$'.submatch(2).'$' : '$$'.submatch(4).'$$'/g
:%s/\$\$\(\_.\{-}\)\$\$\|\$\(.\{-}\)\$/\=submatch(0) =~ '^\$\$' ? '\['.submatch(1).'\]' : '\('.submatch(2).'\)'/g
Wikitext
> :
:%s#<syntaxhighlight[^>]*inline>\(.\{-}\)
#\1#g
</syntaxhighlight>