Refactor
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
{{ $content = $content | replaceRE `<!--more-->\n+` "" -}}
|
||||
{{ $content = $content | replaceRE `\[([^\]]+)\]\[(\d+)\]` "$1[$2]" -}}
|
||||
{{ $content = $content | replaceRE `(?m)^\[(\d+)\]: (.*)$` "=> $2 [$1] $2" -}}
|
||||
{{ $content = $content | replaceRE `=> (/.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}}
|
||||
{{ $content = $content | replaceRE `(?m) >` ">" -}}
|
||||
{{ $content = $content | replaceRE `\[([^\]]+)\]\([^\)]+\)` "$1" -}}
|
||||
{{ $content = $content | replaceRE `(?m)^ >` ">" -}}
|
||||
{{ $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}}
|
||||
{{ $content = $content | replaceRE `(?m)^- ` "* " -}}
|
||||
{{ $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}}
|
||||
{{ $content = $content | replaceRE `=> (/.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}}
|
||||
{{ $audioRE := `<audio controls src="(.*/([^"]+))"></audio>` -}}
|
||||
{{ range findRE $audioRE $content -}}
|
||||
{{ $url := . | replaceRE $audioRE "$1" | replaceRE ` ` "%20" -}}
|
||||
|
||||
Reference in New Issue
Block a user