Update of bug #66987 (group groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
commit 730e773696c21c0d06e913206acf39b041982af4
Author: G. Branden Robinson <[email protected]>
Date: Thu Jul 2 10:43:31 2026 -0500
[troff]: Refactor to kill off `ESCAPE_NEWLINE`.
There appears to be no advantage to encoding escaped newlines in macro
definitions. Its purpose cannot be to restore or pretty-print a macro
definition exactly as it was input, as no mechanism for doing so exists,
and comments are already discarded upon reading.
* src/roff/troff/input.h: Delete definition of `ESCAPE_NEWLINE`
constant.
* src/roff/troff/input.cpp (read_character_in_copy_mode)
(token::next)
(string_iterator::fill)
(do_define_macro): Stop handling constant.
Fixes <https://savannah.gnu.org/bugs/?66987>.
Before:
$ printf '.de XX\n. nop foo\\\n bar\n..\n.XX\n.pm XX\n' \
| ~/groff-1.24.1/bin/groff -a 2>/dev/null
<beginning of page>
foo bar
$ printf '.de XX\n. nop foo\\\n bar\n..\n.XX\n.pm XX\n' \
| ~/groff-1.24.1/bin/groff -z 2>&1 | jq
{
"name": "XX",
"file name": "<standard input>",
"starting line number": 2,
"length": 14,
"contents": ".nop foo\u0011 bar\n",
"node list": []
}
After:
$ printf '.de XX\n. nop foo\\\n bar\n..\n.XX\n.pm XX\n' \
| ./build/test-groff -a 2>/dev/null
<beginning of page>
foo bar
$ printf '.de XX\n. nop foo\\\n bar\n..\n.XX\n.pm XX\n' \
| ./build/test-groff -z 2>&1 | jq
{
"name": "XX",
"file name": "<standard input>",
"starting line number": 2,
"length": 13,
"contents": ".nop foo bar\n",
"node list": []
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66987>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
