Bug 252198 - Unescaped backslash renders to incorrect code example in xo_emit.3
Summary: Unescaped backslash renders to incorrect code example in xo_emit.3
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-27 11:44 UTC by Robert Watson
Modified: 2020-12-27 17:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Watson freebsd_committer 2020-12-27 11:44:12 UTC
The xo_emit.3 man page fail to escape a backslash properly, leading to an incorrect code example when rendered.

               xo_emit(" {:lines/%7ju} {:words/%7ju} "
                       "{:characters/%7ju} {d:filename/%s}0,
                       linect, wordct, charct, file);

Escaping properly using "\en" fixes this problem. Patch submitted upstream to libxo, but it's not clear that they are currently processing pull requests.

    https://github.com/Juniper/libxo/pull/76

So we might want to incorporate this change directly into contrib in the mean time.
Comment 1 Ed Maste freebsd_committer 2020-12-27 17:52:57 UTC
Yes, I agree we should bring the change into contrib.