Follow-up Comment #15, bug #66040 (group groff): I've got some new stuff on the cooker.
commit bc4036b10995058cce7a96949ca13ca2dcb96496 (HEAD) Author: G. Branden Robinson <g.branden.robin...@gmail.com> Date: Thu Aug 1 16:45:35 2024 -0500 [troff]: Validate `hcode` request arguments more. * src/roff/troff/input.cpp (set_hyphenation_code): Do more input validation of `hcode` request arguments. Handle case where an argument is an escape sequence (but not a special character) ourselves instead of delegating it to `token::get_char()`. Throw errors when (1) the destination character is a numeral; (2) the destination character is a (non-special-character) escape sequence; (3) the source character is a numeral; and (4) the source character is a (non-special-character) escape sequence. Improve wording of existing diagnostic, noting validity of special character escape sequence as a source character _if_ it has already been assigned a hyphenation code (implicitly: a non-zero one). * doc/groff.texi.in (Manipulating Hyphenation) <hcode>: * man/groff_diff.7.man (New requests) <hcode>: Document that the request aborts processing its arguments upon encountering an invalid one. Continues <https://savannah.gnu.org/bugs/?66040>. Thanks to Dave Kemper for further discussion. $ nl hcode.groff 1 .hcode 2 .hcode \: 3 .hcode a 4 .hcode 0 b 5 .hcode c\: 6 .hcode \['A] \['a] 7 .hcode d 0 8 .hcode eE 9 .hcode f F 10 .hcode g G\" This is my comment. 11 .hcode \['i] i 12 .hcode \['o] \['o] 13 .hcode \['u] u 14 .hcode \['U] \['u] $ ./build/test-groff -T utf8 -ww hcode.groff troff:hcode.groff:1: warning: hyphenation code configuration request expects arguments troff:hcode.groff:2: error: expected ordinary or special character, got an escaped ':' troff:hcode.groff:3: error: hyphenation codes must be specified in pairs troff:hcode.groff:4: error: cannot apply a hyphenation code to a numeral troff:hcode.groff:5: error: expected ordinary or special character, got an escaped ':' troff:hcode.groff:6: error: second member of hyphenation code pair must be an ordinary character, or a special character already assigned a hyphenation code troff:hcode.groff:7: error: cannot use the hyphenation code of a numeral troff:hcode.groff:12: error: second member of hyphenation code pair must be an ordinary character, or a special character already assigned a hyphenation code _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66040> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature