diff options
author | June McEnroe <june@causal.agency> | 2019-12-18 23:37:45 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-18 23:39:54 -0500 |
commit | 62b345dc27d1fa61c6dbe9e02b684f6efe347280 (patch) | |
tree | f33c8d645070e49bb34a6c26e0a2d5174d2ee769 /www/git.causal.agency/source-filter.sh | |
parent | Customize cgit CSS (diff) | |
download | src-62b345dc27d1fa61c6dbe9e02b684f6efe347280.tar.gz src-62b345dc27d1fa61c6dbe9e02b684f6efe347280.zip |
Hide line numbers when rendering mdoc
Hack: output an extra <td> after rendering mdoc so that line numbers can be hidden based on there being three. This required splitting source-filter and about-filter since on about pages there is no table.
Diffstat (limited to 'www/git.causal.agency/source-filter.sh')
-rw-r--r-- | www/git.causal.agency/source-filter.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/www/git.causal.agency/source-filter.sh b/www/git.causal.agency/source-filter.sh index ce9e3f8b..868859b4 100644 --- a/www/git.causal.agency/source-filter.sh +++ b/www/git.causal.agency/source-filter.sh @@ -2,10 +2,8 @@ case "$1" in (*.[1-9]) - /usr/bin/mandoc -T utf8 \ - | /usr/local/libexec/ttpre \ - | /usr/bin/sed -E \ - 's,([a-z0-9_-]+)[(]([1-9])[)],<a href="\1.\2">&</a>,g' + /usr/local/libexec/about-filter "$@" + printf '</code></pre></td><td><pre><code>' ;; (*) exec /usr/local/libexec/hi -t -n "$1" -f html -o anchor |