提交 0882180d 编写于 作者: D Dillon ZENG

fix: smarter typeit shortcode

Signed-off-by: NDillon ZENG <dillonzq@outlook.com>
上级 c0237f38
......@@ -12,7 +12,7 @@
{{ $content = replaceRE `\n</span>` "</span>\n" $content }}
{{ $content = replaceRE `(?m)^(<span.*?>)(.*?)\[(.*?)\]\((.*?)\)(.*?)(</span>)` "$1$2$6<a href=$4>$3</a>$1$5$6" $content }}
{{ $content = replaceRE `(?m)^( +)<span` "<span class=space>$1</span><span" $content }}
{{ $content = replaceRE `</span>( +)<span` "</span></span><span class=space>$1</span><span" $content | replaceRE `\n` "<br />" }}
{{ $content = replaceRE `</span>( +)<span` "</span><span class=space>$1</span><span" $content | replaceRE `\n` "<br />" }}
<div id={{ printf "r%s" $id }} hidden=true>{{ $content | safeHTML }}</div>
<div class={{ .Get "class" | default "typeit-code" }} id={{ $id }}></div>
{{ else }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册