diff options
author | Dillon <dillonzq@outlook.com> | 2020-01-31 17:53:04 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-01-31 17:53:04 +0300 |
commit | 2a7611b5aec71c5b42984be947934d4c074a092e (patch) | |
tree | 9e4233c43eb38993493ec3d22c41801dc979b971 /layouts/_default/single.html | |
parent | 344f0a9f411a9b28d6e5732e591f26953d9c1263 (diff) |
chore(style): update code style
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r-- | layouts/_default/single.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1c22375..eb6e346 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,21 +7,27 @@ </h1> <div class="post-content"> {{- $content := .Content -}} + {{- $REin := `:\(([\w- ]+?)\):` -}} {{- $REout := `<i class="$1 fa-fw"></i>` -}} {{- $content = replaceRE $REin $REout $content -}} + {{- $REin = `\[(.+?)\]\^\((.+?)\)` -}} {{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}} {{- $content = replaceRE $REin $REout $content -}} + {{- $REin = `<sup>\[return\]</sup>` -}} {{- $REout = printf "<sup>[%s]</sup>" (T "return") -}} {{- $content = replaceRE $REin $REout $content -}} + {{- $REin = `<(h[23456]) (id=".+?")>` -}} {{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}} {{- $content = replaceRE $REin $REout $content -}} + {{- $REin = `<(.+) (id="fnref:.+?")>` -}} {{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}} {{- $content = replaceRE $REin $REout $content -}} + {{- $content | safeHTML -}} </div> </div> |