shithub: werc

Download patch

ref: 16e503337ce2f215a2e9d9f3a8a3679065909c60
parent: 337f9d5514a91efb6db99e1d1905783975757fbf
author: sl <[email protected]>
date: Wed Feb 10 15:34:33 EST 2016

apps/wman: fix comments and restore template syntax.

--- a/apps/wman/app.rc
+++ b/apps/wman/app.rc
@@ -79,7 +79,7 @@
 }
 
 fn wman_default_out_filter {
-    # Using GNU col here to remove nroffs garbage (eg., from .ft B); p9p has no col(1) :(
+	# col -x syntax is the same for UNIX and Plan 9.
     escape_html \
     | sed 's!([\.\-a-zA-Z0-9]+)\(('^`{echo $wman_cat_list|tr ' ' '|'}^')\)!<a href="../\2/\1">&</a>!g' \
     | awk '/^$/ {if(n != 1) print; n=1; next} /./ {n=0; print}' \
--- a/apps/wman/page_list.tpl
+++ b/apps/wman/page_list.tpl
@@ -1,8 +1,11 @@
+% d=`{wman_get_section_desc $wman_cat} 
+<h1>Manual pages - Section %($wman_cat%): %($"d%)</h1>
 
-% d=`{wman_get_section_desc $wman_cat}
-<h1>Manual pages - Section
-% echo $wman_cat': '$"d2
-</h1>
 <ul style="float:left">
-% wman_ls_pages $wman_cat_path | awk -F/ '{ print "<li><a href=\""$(NF)"\">"$(NF)"</a></li>" } NR%20 == 0 { print "</ul><ul style=\"float: left\">" }'
+%{
+wman_ls_pages $wman_cat_path \
+    | awk -F/ '{ print "<li><a href=\""$(NF)"\">"$(NF)"</a></li>" }
+    NR%20 == 0 { print "</ul><ul style=\"float: left\">" }'
+%}
 </ul>
+