X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=tools.sh;h=248a2542b2a86df0d57877cc8330a150a437d88f;hb=8013758c0165b050d45b11e550ced3576bb520df;hp=dfa4594576d9538105afbdc7a2c9eabdded5ec92;hpb=11b34efdbb85ef0accaf366b25f952f41e1b4aa4;p=shellwiki diff --git a/tools.sh b/tools.sh index dfa4594..248a254 100755 --- a/tools.sh +++ b/tools.sh @@ -189,23 +189,26 @@ has_tag() { page_title() { local mdfile PAGE_TITLE - if mdfile="$(mdfile "${1:-${PATH_INFO%/*}}")"; then - PAGE_TITLE="$( - sed -nE ' - s;^%title[ \t]+([[:graph:]][[:print:]]+)\r?$;\1;p; tQ; - b; :Q q; - ' "$mdfile" - )" - [ ! "${PAGE_TITLE}" ] && PAGE_TITLE="$( - MD_MACROS="" md <"$mdfile" \ - | sed -nE ' - s;^.*