From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: from mandoc.bsd.lv (bsd.lv [66.111.2.12]) by inbox.vuxu.org (Postfix) with ESMTP id F010D29DDD for ; Sat, 16 Mar 2024 14:55:00 +0100 (CET) Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 592dc997 for ; Sat, 16 Mar 2024 13:54:59 +0000 (UTC) Received: from mail.ljabl.com (mail.ljabl.com [88.99.6.227]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id a7539212 for ; Sat, 16 Mar 2024 13:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljabl.com; s=20220906; t=1710597297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikv1M28KeQp/z34YEixue19gGfTP7PGHch7EJv9mLMM=; b=dOEe/z3Ep0PIy7b9UqZPLjBawMWSNBp0FeqjIFKfA4Cu3lt4nb8CFCG3cldUgbek3kB+Xw V2AYAG37hOLIk06mbqvL5aeJvmj1G5ruqiFnf606zEL7D+SGI1UqbbWh0NnEdpagw4fc4Y 3GS6ObeyZauufTK2/zRhEMfYqZzrcPY= Received: by ljabl.com (OpenSMTPD) with ESMTPSA id db3ec0d1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 16 Mar 2024 13:54:56 +0000 (UTC) Received: by fluorine (OpenSMTPD) with ESMTPA id ecc3071c for ; Sat, 16 Mar 2024 14:54:56 +0100 (CET) Date: Sat, 16 Mar 2024 13:54:56 +0000 From: Lennart Jablonka To: discuss@mandoc.bsd.lv Subject: Re: bug: quoted punctuation behaves strangely Message-ID: Mail-Followup-To: discuss@mandoc.bsd.lv References: X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Content-Language: en-US X-Clacks-Overhead: GNU Terry Pratchett Quoth Jan Stary: >On Mar 12 11:56:39, humm@ljabl.com wrote: >> Consider: >> >> .Pq asdf . >> .Pq asdf "." >> >> The expected output: >> >> (asdf). (asdf). > >If I'm reading mdoc(7) right, this is what the >Delimiters section has to say on that: > > When a macro argument consists of one single input character > considered as a delimiter, the argument gets special handling. > This does not apply when delimiters appear in arguments > containing more than one character. > >Your "." (quotes included) contains more than one character, >so it is not a delimiter. In the troff language, a macro does not see the quotes surrounding an argument. An argument can be quoted to contain spaces or quotes; that’s transparent to the macro. So here, the argument does contain a single character and troff -mdoc treats it that way. (Tested 4.4BSD-Lite2’s -mdoc, OpenBSD’s /usr/share/tmac/doc.tmac, and groff -mdoc.) Further, even if that was not the case, the output would still be wrong: .Pq asdf \&. .Pq asdf "." results in (asdf .) (asdf.) >Also, why would you ever do this? You wouldn’t. And yet I did find it in the wild. -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv