Slightly nicer PDF handling

This commit is contained in:
David Eisinger
2025-02-16 02:21:34 -05:00
parent 555f7f9d68
commit 43f54a4cd2

View File

@@ -3,7 +3,7 @@
{{ $content = $content | replaceRE `<!--more-->\n+` "" -}} {{ $content = $content | replaceRE `<!--more-->\n+` "" -}}
{{ $content = $content | replaceRE `\[([^\]]+)\]\[(\d+)\]` "$1[$2]" -}} {{ $content = $content | replaceRE `\[([^\]]+)\]\[(\d+)\]` "$1[$2]" -}}
{{ $content = $content | replaceRE `(?m)^\[(\d+)\]: (.*)$` "=> $2 [$1] $2" -}} {{ $content = $content | replaceRE `(?m)^\[(\d+)\]: (.*)$` "=> $2 [$1] $2" -}}
{{ $content = $content | replaceRE `=> (/.+\.pdf)` "=> https://davideisinger.com$1" -}} {{ $content = $content | replaceRE `=> (/.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}}
{{ $content = $content | replaceRE `(?m) >` ">" -}} {{ $content = $content | replaceRE `(?m) >` ">" -}}
{{ $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}} {{ $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}}
{{ $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}} {{ $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}}