diff options
| author | bptato <nincsnevem662@gmail.com> | 2023-10-13 18:21:09 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2023-10-13 18:21:09 +0200 |
| commit | 04cbc981edb8edc586d06ce804c24951dd1badd6 (patch) | |
| tree | f4aa577e29d3ee34d16e85ab20961b94ae8a74f9 | |
| parent | 1cfe1655e1ef6f7ae69b9c87731d571e1ef3ca8c (diff) | |
| download | chawan-04cbc981edb8edc586d06ce804c24951dd1badd6.tar.gz | |
slightly refactor md to man preprocessing, update manpage
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | doc/cha.1 | 7 | ||||
| -rwxr-xr-x | md2manpreproc (renamed from table_rewrite.sh) | 6 |
3 files changed, 9 insertions, 9 deletions
@@ -55,10 +55,7 @@ clean: rm -f lib/libquickjs.a $(OBJDIR)/man/cha-%.md: doc/%.md | $(OBJDIR)/man/ - sed -e '/<!-- MANOFF -->/,/<!-- MANON -->/d' \ - -e '/^<!-- MANON$$/d' \ - -e '/^MANOFF -->$$/d' $< | \ - ./table_rewrite.sh > $@ + ./md2manpreproc $< > $@ $(OBJDIR)/man/cha-%.5: $(OBJDIR)/man/cha-%.md | $(OBJDIR)/man/ pandoc --standalone --to man $< -o $@ @@ -47,7 +47,7 @@ valid TOML. (The sole exception is quoting: to ease specifying string parameters, unrecognized bare keywords are converted to strings. So this -works: \fB--opt\fR \fIabcd.option-name\fR=\fIoption-value\fR. However, symbols must +works: \fB--opt\fR abcd.option-name=\fIoption-value\fR. However, symbols must still be quoted.) .TP \fB\-c, \-\-css\fR \fIstylesheet\fR @@ -67,11 +67,11 @@ often, consider changing the default input charset recognition list .TP \fB\-O, \-\-output-charset\fR \fIcharset\fR Override the output character set. This is a shortcut for -\fB\-o \fIencoding.display\-charset\fR=\fIcharset\fR. +\fB\-o encoding.display\-charset=\fIcharset\fR. .TP \fB\-M, \-\-monochrome\fR Override the output character set. This is a shortcut for -\fB\-o \fIdisplay.color\-mode\fR=\fIansi\fR. +\fB\-o display.color\-mode=\fIansi\fR. .TP \fB\-V, \-\-visual\fR Start in visual mode: the page specified in \fIstart.visual-home\fR is opened. @@ -124,4 +124,5 @@ Configuration options are described in \fBcha-config\fR(5). .SH SEE ALSO \fBcha-mailcap\fR(5), \fBcha-mime.types\fR(5), \fBcha-config\fR(5), +.br \fBcha-localcgi\fR(5) \fBcha-urimethodmap\fR(5) diff --git a/table_rewrite.sh b/md2manpreproc index dcf51edb..35ce815b 100755 --- a/table_rewrite.sh +++ b/md2manpreproc @@ -36,10 +36,12 @@ format_table() { -e 's/^ *//g;s/ *$//g' } +sed -e '/<!-- MANOFF -->/,/<!-- MANON -->/d' \ + -e '/^<!-- MANON$/d' \ + -e '/^MANOFF -->$/d' "$@" | \ while read line do if test "$line" = "<table>" then format_table - else - printf '%s\n' "$line" + else printf '%s\n' "$line" fi done |