CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2026/10/07 09:56:51

Modified files:
        usr.bin/mandoc : term.c 

Log message:
When rendering the \l (horizontal line) escape sequence,
correctly determine whether a drawing glyph is specified
before the delimiter closing the escape sequence.

The code only compared the first input byte of the candidate
to the last input byte of the opening delimiter, treating the
candidate as a drawing glyph on mismatch, which only worked
correctly for single-byte delimiters.
When an escape sequence is used as a delimiter, that escape
sequence was erroneously used as the drawing glyph, too.

Instead of needlessly and incorrectly trying to compare the
opening and closing delimiters, use the argument information
returned from mandoc_escape(): if a2roffsu() consumed the
whole argument, use the default drawing glyph; otherwise,
use the rest of the argument as the drawing glyph.

Reply via email to