From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wonkity.com (wonkity.com [67.158.26.137]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 5a8a120e for ; Sun, 17 Apr 2016 11:20:35 -0500 (EST) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u3HGKQFf041445 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 17 Apr 2016 10:20:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u3HGKNa4041439; Sun, 17 Apr 2016 10:20:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 17 Apr 2016 10:20:23 -0600 (MDT) From: Warren Block To: discuss@mdocml.bsd.lv cc: wblock@FreeBSD.org Subject: Escaping preference Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sun, 17 Apr 2016 10:20:26 -0600 (MDT) 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