Juniper / libxo

The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.
http://juniper.github.io/libxo/libxo-manual.html
BSD 2-Clause "Simplified" License
321 stars 48 forks source link

Escape backslash in xo_emit.3 so it renders correctly #76

Closed rwatson closed 3 years ago

rwatson commented 3 years ago

The unescaped "\n" in xo_emit.3 generates incorrect output when rendered:

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

This change escapes as "\en" so that the example code renders correctly.

philshafer commented 3 years ago

I have a fix in the "develop" branch changing the "\n" to "\n". Is that sufficient or does it need changed to "\en"? Either way, I'll need to spin a new release and import it into freebsd.

Thanks, Phil

rwatson commented 3 years ago

I'm afraid those both look the same to me. In my original patch I wrote "\n" and it rendered right, but on reading the nroff documentation, \en is preferred, it appears. But we could ask someone who actually understands nroff for their opinion?

philshafer commented 3 years ago

Fixed in 'develop'