mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
troff: support \~
as an alias for \
(#567)
In groff, Heirloom Doctools troff, and neatroff, the `\~` escape sequence produces an adjustable (paddable) but unbreakable space. mandoc, which does not perform adjustment or render to typesetters, supports the escape sequence as a synonym for `\ `, the same as `\0`. This extension is of long pedigree: groff has supported it for at least 30 years, Heirloom for 17, mandoc for 13, and neatroff for 6. Do the same as mandoc to prevent mis-rendering of documents using this escape sequence. Heirloom Doctools troff, a descendant of Documenter's Workbench troff, would be a good place to look for a compatible implementation of the adjustable semantics for this sequence.
This commit is contained in:
parent
506de8f6d4
commit
93f8143600
1 changed files with 2 additions and 0 deletions
|
@ -512,6 +512,8 @@ g0:
|
|||
case '\n': /* concealed newline */
|
||||
numtabp[CD].val++;
|
||||
goto g0;
|
||||
case '~': /* Heirloom/groff/neatroff: unbreakable space */
|
||||
; /* fall through */
|
||||
case ' ': /* unpaddable space */
|
||||
i = UNPAD;
|
||||
goto gx;
|
||||
|
|
Loading…
Reference in a new issue