This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pod/perluniprops: Split run-on lines before '\'
authorKarl Williamson <khw@cpan.org>
Fri, 22 May 2020 13:20:14 +0000 (07:20 -0600)
committerSawyer X <xsawyerx@cpan.org>
Wed, 27 May 2020 08:09:32 +0000 (11:09 +0300)
This changes mktables, which generates this pod, to consider long pod
lines to be splittable before most backslashes.  On os390, the lack of
this caused a line to not be split at all, creating a Porting test
failure.

There is also a current rule that you can split at a lowercase/uppercase
boundary.  This works for the limited domain this code is run on.  But
it shouldn't split \cK.  So don't do the split if the lowercase is a
single letter preceded by a backslash.

charclass_invlists.h
lib/unicore/mktables
lib/unicore/uni_keywords.pl
regcharclass.h
uni_keywords.h

index 9e2b676..9a6a9cf 100644 (file)
@@ -419864,7 +419864,7 @@ static const U8 WB_table[23][23] = {
  * baba9dfc133e3cb770a89aaf0973b1341fa61c2da6c176baf6428898b3b568d8 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * aee2ce1142e88494b09ea4abc065f8d74ad1a95f5fb3e03da469ab84306386e9 lib/unicore/mktables
+ * ee0dd174fd5b158d82dfea95d7d822ca0bfcd490182669353dca3ab39a8ee807 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
index 8ae7b6f..89930f5 100644 (file)
@@ -9587,6 +9587,9 @@ sub simple_fold( $line, $prefix="", $hanging_indent=0, $right_margin=0) {
                         (?:                   #  acceptable break:
                             [ \s = ]          # space or equal
                             | - (?! [.0-9] )  # or non-unary minus.
+                            | [^\\[(] (?= \\ )# break before single backslash
+                                              #  not immediately after opening
+                                              #  punctuation
                         )                     # $1 includes the character
                     )/x)
                 {
@@ -9608,7 +9611,7 @@ sub simple_fold( $line, $prefix="", $hanging_indent=0, $right_margin=0) {
                 # access the files that this program is creating.
                 elsif ($segment !~ /\a/
                        && ($segment =~ s/_/_\a/g
-                       || $segment =~ s/ ( [a-z] ) (?= [A-Z] )/$1\a/xg))
+                       || $segment =~ s/ ( (?!\\) [a-z] ) (?= [A-Z] )/$1\a/xg))
                 {
                     # Here were able to find at least one place to insert
                     # our substitute soft hyphen.  Find the right-most one
index 3dc3a89..2b57230 100644 (file)
 # baba9dfc133e3cb770a89aaf0973b1341fa61c2da6c176baf6428898b3b568d8 lib/unicore/extracted/DLineBreak.txt
 # 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
 # 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
-# aee2ce1142e88494b09ea4abc065f8d74ad1a95f5fb3e03da469ab84306386e9 lib/unicore/mktables
+# ee0dd174fd5b158d82dfea95d7d822ca0bfcd490182669353dca3ab39a8ee807 lib/unicore/mktables
 # 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
 # 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
 # 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl
index c9e0bfe..0bc4850 100644 (file)
  * baba9dfc133e3cb770a89aaf0973b1341fa61c2da6c176baf6428898b3b568d8 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * aee2ce1142e88494b09ea4abc065f8d74ad1a95f5fb3e03da469ab84306386e9 lib/unicore/mktables
+ * ee0dd174fd5b158d82dfea95d7d822ca0bfcd490182669353dca3ab39a8ee807 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * f9a393e7add8c7c2728356473ce5b52246d51295b2da0c48fb6f0aa21799e2bb regen/regcharclass.pl
index d851d91..a36d8bc 100644 (file)
@@ -7537,7 +7537,7 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
  * baba9dfc133e3cb770a89aaf0973b1341fa61c2da6c176baf6428898b3b568d8 lib/unicore/extracted/DLineBreak.txt
  * 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
  * 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * aee2ce1142e88494b09ea4abc065f8d74ad1a95f5fb3e03da469ab84306386e9 lib/unicore/mktables
+ * ee0dd174fd5b158d82dfea95d7d822ca0bfcd490182669353dca3ab39a8ee807 lib/unicore/mktables
  * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
  * 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
  * 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl