From a8bb44da3a70c4ef8fa916ed26b22e43232f272e Mon Sep 17 00:00:00 2001 From: Dillon Date: Sun, 11 Aug 2019 04:55:01 +0800 Subject: [PATCH] fix: smarter typeit shortcode --- layouts/shortcodes/typeit.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/layouts/shortcodes/typeit.html b/layouts/shortcodes/typeit.html index 4cf0bf8..0dcbdc0 100644 --- a/layouts/shortcodes/typeit.html +++ b/layouts/shortcodes/typeit.html @@ -11,8 +11,7 @@ {{ $content = trim $content "\n" }} {{ $content = replaceRE `\n` "\n" $content }} {{ $content = replaceRE `(?m)^()(.*?)\[(.*?)\]\((.*?)\)(.*?)()` "$1$2$6$3$1$5$6" $content }} - {{ $content = replaceRE `(?m)^( +)$1( +)$1" }} + {{ $content = replaceRE ` ` " " $content | replaceRE `(<\w+) ` "$1 " | replaceRE `\n` "
" }}
{{ else }}