help / color / mirror / Atom feed
* Escaping preference
@ 2016-04-17 16:20 Warren Block
  2016-04-17 16:55 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Warren Block @ 2016-04-17 16:20 UTC (permalink / raw)
  To: discuss; +Cc: wblock

Just had a bug reported where "\n" used in code examples was not escaped 
and so renders improperly.

   printf("Bad input\n");

renders as

   printf("Bad input0);

on both FreeBSD 10 and 11 (groff and mandoc, respectively).


Both of these escaped forms renders properly:

   printf("Bad input\\n");
   printf("Bad input\en");

\e is recommended in Escaping Special Characters in mdoc(7) (really 
groff_mdoc(7)) on FreeBSD 10, not mentioned in mandoc's mdoc(7) on 
FreeBSD 11.

The double backslash appears preferable to me, more recognizable for
people who might not be familiar with mdoc markup.  Is there any reason 
to prefer the \e version?
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-17 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-17 16:20 Escaping preference Warren Block
2016-04-17 16:55 ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).