Re: [PATCH] regex.3: "([^...])" is not an end of sentence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On 7/8/23 15:52, G. Branden Robinson wrote:
Hi Tom,

At 2023-07-08T10:10:01+0000, Tom Schwindl wrote:
On Sat Jul 8, 2023 at 5:11 AM CEST, наб wrote:
diff --git a/man3/regex.3 b/man3/regex.3
index 13e540b22..630c0369d 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -109,7 +109,7 @@ .SS Compilation
  Match-any-character operators don't match a newline.
  .IP
  A nonmatching list
-.RB ( [\[ha]...] )
+.RB ( [\[ha]...\&] )
  not containing a newline does not match a newline.
  .IP
  Match-beginning-of-line operator

I cannot reproduce this on my system; only one space is rendered.

You may have the inter-sentence space amount configured to zero.[1]

I get the extra space with all of DWB 3.3 nroff, Heirloom Doctools
nroff, mandoc, and groff.

$ printf '.ll 100n\nA nonmatching list\n([\(ha...])\nnot containing a newline does not match a newline.\n' | groff -Tascii | cat -s
A nonmatching list ([^...])  not containing a newline does not match a newline.

[cd DWB][2]
$ printf '.ll 100n\nA nonmatching list\n([\(ha...])\nnot containing a newline does not match a newline.\n' | DWBHOME=. ./bin/nroff | cat -s
A nonmatching list ([...])  not containing a newline does not match a newline.

[cd Heirloom]
$ printf '.ll 100n\nA nonmatching list\n([\(ha...])\nnot containing a newline does not match a newline.\n' | ./bin/nroff | cat -s
A nonmatching list ([^...])  not containing a newline does not match a newline.

$ printf '.ll 100n\nA nonmatching list\n([\(ha...])\nnot containing a newline does not match a newline.\n' | mandoc | cat -s
()                                                                          ()

A nonmatching list ([^...])  not containing a newline does not match a newline.

                                                                                                   ()
Regards,
Branden

[1] Adding the following line to your man.local file in a groff
     installation would do the trick.

     .ss 12 0

     In groff, this is also the default for several "groff locales",
     including "cs", "de", "fr", "sv", and, new in groff 1.23.0, "it".

[2] I respelled the \[ha] special character escape sequence in legacy
     form for greater portability, but the "ha" special character _name_
     is not recognized by DWB troff (which has not been maintained for
     about 30 years).

Thanks you all!  Patch applied.

Cheers,
Alex

--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux