]> git.plutz.net Git - shellwiki/commitdiff
skip parser stack for page_title() function, use fixed md parser instead
authorPaul Hänsch <paul@plutz.net>
Mon, 23 Sep 2024 04:40:52 +0000 (06:40 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 23 Sep 2024 04:40:52 +0000 (06:40 +0200)
tools.sh

index b19a83d92c5c87be2005c6e3035982275aa69548..6923b6a53e43b31be70c5d1cc867e07deb588a74 100755 (executable)
--- a/tools.sh
+++ b/tools.sh
@@ -231,7 +231,7 @@ page_title() {
     )"
     [ ! "${PAGE_TITLE}" ] && PAGE_TITLE="$(
       # pick title from first h1/h2 headline
-      MD_MACROS="" md <"$mdfile" \
+      awk -f "${_EXEC}/cgilite/markdown.awk" <"$mdfile" \
       | sed -nE '
         s;^.*<h1[^>]*>(.*>)?([^<]+)(<.*)?</h1>.*$;\2;; tQ;
         s;^.*<h2[^>]*>(.*>)?([^<]+)(<.*)?</h2>.*$;\2;; tQ;