From: paul Date: Mon, 3 Apr 2017 10:52:26 +0000 (+0000) Subject: easyer syntax highlighting in case-esac, prevent curious parsing error X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=81d64d0623b1009292cd3a6f2162c7637d1f51ac;p=serve0 easyer syntax highlighting in case-esac, prevent curious parsing error svn path=/trunk/; revision=183 --- diff --git a/templates/browse.html.sh b/templates/browse.html.sh index 7f28f83..6a86c3f 100755 --- a/templates/browse.html.sh +++ b/templates/browse.html.sh @@ -60,10 +60,10 @@ EOF plink="$(($pn * $pagesize - $pagesize + 1))" case "$plink" in - $(($page - $pagesize))) class=previous;; - $page) class=current;; - $(($page + $pagesize))) class=next;; - * ) class='';; + ($(($page - $pagesize))) class=previous;; + ($page) class=current;; + ($(($page + $pagesize))) class=next;; + (*) class='';; esac printf '%s\n' "$class" "$page_link" "$plink" "$pn" diff --git a/templates/list.html.sh b/templates/list.html.sh index 144ad0e..e60f3b8 100755 --- a/templates/list.html.sh +++ b/templates/list.html.sh @@ -60,10 +60,10 @@ EOF plink="$(($pn * $pagesize - $pagesize + 1))" case "$plink" in - $(($page - $pagesize))) class=previous;; - $page) class=current;; - $(($page + $pagesize))) class=next;; - * ) class='';; + ($(($page - $pagesize))) class=previous;; + ($page) class=current;; + ($(($page + $pagesize))) class=next;; + (*) class='';; esac printf '%s\n' "$class" "$page_link" "$plink" "$pn"