Bug#1050875: feh: Escape hyphens in manpage
Peter Samuelson
peters at p12n.org
Wed Aug 30 17:49:45 BST 2023
Package: feh
Version: 3.10-1
Severity: minor
Tags: patch upstream
feh.1, like many manpages, fails to escape the `-` character in option
descriptions. In modern groff, this causes each one to be rendered as
U+2010 "HYPHEN" instead of the ASCII character (U+002D "HYPHEN-MINUS").
The net effect:
- Certain old fonts (I still use the classic X11 'fixed' for my xterms)
don't have the U+2010 glyph
- Searching in "less" (by typing, e.g., "/--auto <Ret>" does not work.
Fortunately the manpage formats every instance of every option with the
"Cm" macro, so this is easy to fix without also hitting all the
legitimate English-language hyphens that are not options (as in the
phrase "English-language"). Here is a simple patch.
Thanks,
Peter
-------------- next part --------------
--- feh-3.10/man/Makefile~ 2023-04-06 09:19:59.000000000 -0500
+++ feh-3.10/man/Makefile 2023-08-30 11:35:13.557736015 -0500
@@ -15,6 +15,7 @@
-e 's/\$$MAN_INOTIFY\$$/${MAN_INOTIFY}/' \
-e 's/\$$MAN_MAGIC\$$/${MAN_MAGIC}/' \
-e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
+ -e '/^\(\.Cm\|\.[A-Z][a-z].* Cm\)/{ s/ -\([^ ]\)/ \\-\1/g; s/\(\\-[^ \-]*\)-/\1\\-/g; s/\(\\-[^ \-]*\)-/\1\\-/g }' \
< ${@:.1=.pre} > $@
clean:
More information about the Pkg-phototools-devel
mailing list