discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Warren Block <wblock@wonkity.com>
To: discuss@mdocml.bsd.lv
Cc: wblock@FreeBSD.org
Subject: Escaping preference
Date: Sun, 17 Apr 2016 10:20:23 -0600 (MDT)	[thread overview]
Message-ID: <alpine.BSF.2.20.1604170954030.30232@wonkity.com> (raw)

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).

https://www.freebsd.org/cgi/man.cgi?query=lsearch


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

             reply	other threads:[~2016-04-17 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 16:20 Warren Block [this message]
2016-04-17 16:55 ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.BSF.2.20.1604170954030.30232@wonkity.com \
    --to=wblock@wonkity.com \
    --cc=discuss@mdocml.bsd.lv \
    --cc=wblock@FreeBSD.org \
    --subject='Re: Escaping preference' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).