texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sun, 16 Jan 2022 13:28:58 -0500 (EST)

branch: master
commit f83fff66a6c2fc743d4df3a599479b853523ed53
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 16 19:10:31 2022 +0100

    Use /a regexp modifier to consider only ascii spaces in matching
    
    * tp/Texinfo/ParserNonXS.pm: use /a modifier to match or exclude
    only ascii spaces, as \s can also mean non ascii spaces.  In general
    we want spaces to be only ascii spaces, because it makes more sense to
    consider at least most non ascii spaces as chraracters and not spaces,
    but also because it matches with the XS parser definition of spaces.
---
 ChangeLog                  |  10 ++++
 tp/Texinfo/Convert/HTML.pm |   1 +
 tp/Texinfo/ParserNonXS.pm  | 111 +++++++++++++++++++++++----------------------
 3 files changed, 69 insertions(+), 53 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ac31123b50..7636843f1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-01-16  Patrice Dumas  <pertusus@free.fr>
+
+       Use /a regexp modifier to consider only ascii spaces in matching
+
+       * tp/Texinfo/ParserNonXS.pm: use /a modifier to match or exclude
+       only ascii spaces, as \s can also mean non ascii spaces.  In general
+       we want spaces to be only ascii spaces, because it makes more sense to
+       consider at least most non ascii spaces as chraracters and not spaces,
+       but also because it matches with the XS parser definition of spaces.
+
 2019-01-16  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Figure spaces
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index ac1aaa6407..d0406b74e4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -4263,6 +4263,7 @@ sub _convert_tab_command ($$$$)
     }
   }
 
+  # remove only ascii spaces to keep special formatting spaces
   $content =~ s/^\s*//a;
   $content =~ s/\s*$//a;
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 264970422c..e6aa79adbf 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1007,6 +1007,7 @@ sub _parse_texi_document($)
     my $line;
     ($line, $line_nr) = _next_text($self, $line_nr);
     last if (!defined($line));
+    # non ascii spaces do not start content
     if ($line =~ /^ *\\input/ or $line =~ /^\s*$/) {
       if (not defined($preamble_before_beginning)) {
         $preamble_before_beginning = {'type' => 'preamble_before_beginning',
@@ -1163,13 +1164,13 @@ sub _parse_macro_command_line($$$$$;$)
   my $macro = { 'cmdname' => $command, 'parent' => $parent, 'contents' => [],
                'extra' => {'arg_line' => $line}, 'line_nr' => $line_nr };
   # REMACRO
-  if ($line =~ /^\s+([[:alnum:]][[:alnum:]_-]*)\s*(.*)/) {
+  if ($line =~ /^\s+([[:alnum:]][[:alnum:]_-]*)\s*(.*)/a) {
     my $macro_name = $1;
     my $args_def = $2;
     my @args;
 
-    if ($args_def =~ s/^\s*{\s*(.*?)\s*}\s*//) {
-      @args = split(/\s*,\s*/, $1);
+    if ($args_def =~ s/^\s*{\s*(.*?)\s*}\s*//a) {
+      @args = split(/\s*,\s*/a, $1);
     }
  
     print STDERR "MACRO \@$command $macro_name\n" if ($self->{'DEBUG'});
@@ -1189,7 +1190,7 @@ sub _parse_macro_command_line($$$$$;$)
     }
     # accept an @-command after the arguments in case there is a @c or
     # @comment
-    if ($args_def =~ /^\s*[^\@]/) {
+    if ($args_def =~ /^\s*[^\@]/a) {
       $self->_line_error(sprintf(__("bad syntax for \@%s argument: %s"),
                                  $command, $args_def),
                         $line_nr);
@@ -1872,9 +1873,9 @@ sub _merge_text {
   my $paragraph;
 
   my $no_merge_with_following_text = 0;
-  if ($text =~ /\S/) {
+  if ($text =~ /\S/a) {
     my $leading_spaces;
-    if ($text =~ /^(\s+)/) {
+    if ($text =~ /^(\s+)/a) {
       $leading_spaces = $1;
     }
     if ($current->{'contents'} and @{$current->{'contents'}}
@@ -1886,7 +1887,7 @@ sub _merge_text {
       $no_merge_with_following_text = 1;
     }
     if (_abort_empty_line($self, $current, $leading_spaces)) {
-      $text =~ s/^(\s+)//;
+      $text =~ s/^(\s+)//a;
     } 
 
     $paragraph = _begin_paragraph($self, $current);
@@ -2265,25 +2266,25 @@ sub _isolate_last_space
             or ($current->{'contents'}->[-1]->{'type'}
                   and (!$current->{'type'}
                         or $current->{'type'} ne 'line_arg'))
-            or $current->{'contents'}->[-1]->{'text'} !~ /\s+$/;
+            or $current->{'contents'}->[-1]->{'text'} !~ /\s+$/a;
 
   if ($current->{'type'} and $current->{'type'} eq 'menu_entry_node') {
-    if ($current->{'contents'}->[-1]->{'text'} !~ /\S/) {
+    if ($current->{'contents'}->[-1]->{'text'} !~ /\S/a) {
       $current->{'contents'}->[-1]->{'type'} = 'space_at_end_menu_node';
     } else {
-      $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//;
+      $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//a;
       my $new_spaces = { 'text' => $1, 'parent' => $current,
         'type' => 'space_at_end_menu_node' };
       push @{$current->{'contents'}}, $new_spaces;
     }
   } else {
     # Store final spaces in 'spaces_after_argument'.
-    if ($current->{'contents'}->[-1]->{'text'} !~ /\S/) {
+    if ($current->{'contents'}->[-1]->{'text'} !~ /\S/a) {
       my $end_spaces = $current->{'contents'}->[-1]->{'text'};
       pop @{$current->{'contents'}};
       $current->{'extra'}->{'spaces_after_argument'} = $end_spaces;
     } else {
-      $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//;
+      $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//a;
       $current->{'extra'}->{'spaces_after_argument'} = $1;
     }
   }
@@ -2362,6 +2363,7 @@ sub _split_def_args
   } elsif (defined $root->{'text'}) {
     my @elements;
     my $type;
+    # FIXME how to handle non ascii space in def*?  As space or argument?
     my @split_text = split /(?<=\s)(?=\S)|(?<=\S)(?=\s)/, $root->{'text'};
     if ($split_text[0] =~ /^\s*$/) {
       $type = 'spaces';
@@ -2740,7 +2742,7 @@ sub _end_line($$$)
         $end_comment = pop @{$current->{'contents'}};
       }
       if (!@{$current->{'contents'}} 
-           # empty if only the end of line or spaces
+           # empty if only the end of line or spaces, including non ascii 
spaces
            or (@{$current->{'contents'}} == 1 
                and defined($current->{'contents'}->[-1]->{'text'})
                and $current->{'contents'}->[-1]->{'text'} !~ /\S/)) {
@@ -2928,8 +2930,8 @@ sub _end_line($$$)
           # TODO: this should be a warning or an error - all prototypes
           # on a @multitable line should be in braces, as documented in the
           # Texinfo manual.
-          if ($content->{'text'} =~ /\S/) {
-            foreach my $prototype (split /\s+/, $content->{'text'}) {
+          if ($content->{'text'} =~ /\S/a) {
+            foreach my $prototype (split /\s+/a, $content->{'text'}) {
               push @prototype_row, { 'text' => $prototype, 
                             'type' => 'row_prototype' } unless ($prototype eq 
'');
             }
@@ -3037,7 +3039,7 @@ sub _end_line($$$)
           if (!(($arg->{'cmdname'} 
                and ($arg->{'cmdname'} eq 'c' 
                      or $arg->{'cmdname'} eq 'comment'))
-               or (defined($arg->{'text'}) and $arg->{'text'} !~ /\S/))) {
+               or (defined($arg->{'text'}) and $arg->{'text'} !~ /\S/a))) {
             delete $current->{'extra'}->{'command_as_argument'}->{'type'};
             delete $current->{'extra'}->{'command_as_argument'};
             last;
@@ -3163,11 +3165,12 @@ sub _end_line($$$)
               $current->{'extra'}->{'command_argument'} = $end_command
                 if (defined($end_command));
             }
-            if (($superfluous_arg or $line =~ /\S/)
+            # non ascii spaces are also superfluous arguments
+            if (($superfluous_arg or $line =~ /\S/a)
                 and defined($end_command)) {
               my $texi_line 
                 = 
Texinfo::Convert::Texinfo::convert_to_texinfo($current->{'args'}->[0]);
-              $texi_line =~ s/^\s*([[:alnum:]][[:alnum:]-]+)//;
+              $texi_line =~ s/^\s*([[:alnum:]][[:alnum:]-]+)//a;
               $self->_command_error($current, $line_nr, 
                              __("superfluous argument to \@%s %s: %s"),
                              $command, $end_command, $texi_line);
@@ -3252,8 +3255,8 @@ sub _end_line($$$)
         # with type set to replaced are still shown in error messages.
         my $texi_line 
           = 
Texinfo::Convert::Texinfo::convert_to_texinfo($current->{'args'}->[0], 1);
-        $texi_line =~ s/^\s*//;
-        $texi_line =~ s/\s*$//;
+        $texi_line =~ s/^\s*//a;
+        $texi_line =~ s/\s*$//a;
 
         $self->_command_error($current, $line_nr, 
                        __("bad argument to \@%s: %s"),
@@ -3488,7 +3491,7 @@ sub _end_line($$$)
 sub _start_empty_line_after_command($$$) {
   my ($line, $current, $command) = @_;
 
-  $line =~ s/^([^\S\r\n]*)//;
+  $line =~ s/^([^\S\r\n]*)//a;
   push @{$current->{'contents'}}, { 'type' => 'empty_line_after_command',
                                     'text' => $1,
                                     'parent' => $current, 
@@ -3745,7 +3748,7 @@ sub _parse_texi($$$)
         # FIXME: should we continue with this element instead?
         _abort_empty_line($self, $current);
       }
-      $line =~ s/^([^\S\r\n]*)//;
+      $line =~ s/^([^\S\r\n]*)//a;
       push @{$current->{'contents'}}, { 'type' => 'empty_line', 
                                         'text' => $1,
                                         'parent' => $current };
@@ -3807,7 +3810,7 @@ sub _parse_texi($$$)
           $self->_line_warn(sprintf(
                 __("superfluous argument to \@%s %s: %s"), 'end', $end_command,
                                     $line), $line_nr)
-            if ($line =~ /\S/ and $line !~ /^\s*\@c(omment)?\b/);
+            if ($line =~ /\S/a and $line !~ /^\s*\@c(omment)?\b/a);
           # store toplevel macro specification
           if (($end_command eq 'macro' or $end_command eq 'rmacro') 
                and (! $current->{'parent'} 
@@ -3860,7 +3863,7 @@ sub _parse_texi($$$)
             last;
           } else {
             print STDERR "CLOSED raw $end_command\n" if ($self->{'DEBUG'});
-            $line =~ s/^([^\S\r\n]*)//;
+            $line =~ s/^([^\S\r\n]*)//a;
             # Start an element to have the spaces at the end of the line
             # ignored.
             push @{$current->{'contents'}},
@@ -3874,7 +3877,7 @@ sub _parse_texi($$$)
               and $current->{'contents'}->[-1]->{'type'}
               and $current->{'contents'}->[-1]->{'type'} eq 
'empty_line_after_command'
               and $current->{'contents'}->[-1]->{'text'} !~ /\n/
-              and $line !~ /\S/) {
+              and $line !~ /\S/a) {
             $current->{'contents'}->[-1]->{'text'} .= $line;
           } else {
             push @{$current->{'contents'}}, 
@@ -3953,7 +3956,7 @@ sub _parse_texi($$$)
         my $expanded_macro = $self->{'macros'}->{$command}->{'element'};
         my $args_number = scalar(@{$expanded_macro->{'args'}}) -1;
         my $arguments = [];
-        if ($line =~ s/^\s*{\s*//) { # macro with args
+        if ($line =~ s/^\s*{\s*//a) { # macro with args
           ($arguments, $line, $line_nr) = 
             _expand_macro_arguments($self, $expanded_macro, $line, $line_nr);
         } elsif (($args_number >= 2) or ($args_number <1)) {
@@ -3968,7 +3971,7 @@ sub _parse_texi($$$)
             ($line, $line_nr) = _new_line($self, $line_nr);
             $line = '' if (!defined($line));
           }
-          $line =~ s/^\s*// if ($line =~ /\S/);
+          $line =~ s/^\s*//a if ($line =~ /\S/a);
           my $has_end_of_line = chomp $line;
           $arguments = [$line];
           $line = "\n" if ($has_end_of_line);
@@ -4042,9 +4045,10 @@ sub _parse_texi($$$)
           #    $current->{'cmdname'},
           #    $current->{'parent'}->{'parent'}->{'cmdname'});
           #}
-          if ($line =~ /^[^\S\r\n]/) {
+          # Note that non ascii spaces do not count as spaces
+          if ($line =~ /^[^\S\r\n]/a) {
             if ($current->{'cmdname'} =~ /^[a-zA-Z]/) {
-              $line =~ s/^([^\S\r\n]+)//;
+              $line =~ s/^([^\S\r\n]+)//a;
               $current->{'extra'}->{'spaces'} = '' 
                 if (!defined($current->{'extra'}->{'spaces'}));
               $current->{'extra'}->{'spaces'} .= $1;
@@ -4099,7 +4103,7 @@ sub _parse_texi($$$)
         } else {
           # ignore space after a braced @-command like TeX does
           if ($self->{'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME'}
-              and $line =~ s/^\s+//) {
+              and $line =~ s/^\s+//a) {
             next;
           }
           $self->_line_error(sprintf(__("\@%s expected braces"),
@@ -4127,14 +4131,14 @@ sub _parse_texi($$$)
       } elsif ($current->{'contents'} and @{$current->{'contents'}} 
                and $current->{'contents'}->[-1]->{'type'}
                and $current->{'contents'}->[-1]->{'type'} eq 'menu_star') {
-        if ($line !~ /^\s+/) {
+        if ($line !~ /^\s+/a) {
           print STDERR "ABORT MENU STAR ($line)\n" if ($self->{'DEBUG'});
           delete $current->{'contents'}->[-1]->{'type'};
         } else {
           print STDERR "MENU ENTRY (certainly)\n" if ($self->{'DEBUG'});
           # this is the menu star collected previously
           pop @{$current->{'contents'}};
-          $line =~ s/^(\s+)//;
+          $line =~ s/^(\s+)//a;
           my $leading_text = '*' . $1;
           if ($current->{'type'} eq 'preformatted'
               and $current->{'parent'}->{'type'} 
@@ -4180,12 +4184,12 @@ sub _parse_texi($$$)
         if ($separator eq ':' and $line =~ s/^(:)//) {
           $current->{'args'}->[-1]->{'text'} .= $1;
         # a . not followed by a space.  Not a separator.
-        } elsif ($separator eq '.' and $line =~ /^\S/) {
+        } elsif ($separator eq '.' and $line =~ /^\S/a) {
           pop @{$current->{'args'}};
           $current = $current->{'args'}->[-1];
           $current = _merge_text($self, $current, $separator);
         # here we collect spaces following separators.
-        } elsif ($line =~ s/^([^\S\r\n]+)//) {
+        } elsif ($line =~ s/^([^\S\r\n]+)//a) {
           # FIXME a trailing end of line could be considered to be part
           # of the separator. Right now it is part of the description,
           # since it is catched (in the next while) as one of the case below
@@ -4244,10 +4248,10 @@ sub _parse_texi($$$)
         }
 
         if ($command eq 'value' or $command eq 'txiinternalvalue') {
-          $line =~ s/^\s*//
+          $line =~ s/^\s*//a
              if ($self->{'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME'});
           # REVALUE
-          if ($line =~ s/^{([\w\-][^\s{\\}~`\^+"<>|@]*)}//) {
+          if ($line =~ s/^{([\w\-][^\s{\\}~`\^+"<>|@]*)}//a) {
             my $value = $1;
             if ($command eq 'value') {
               if (exists($self->{'values'}->{$value})) {
@@ -4325,7 +4329,7 @@ sub _parse_texi($$$)
             and $current->{'contents'}
             and $current->{'contents'}->[-1]
             and $current->{'contents'}->[-1]->{'text'}) {
-          $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//;
+          $current->{'contents'}->[-1]->{'text'} =~ s/(\s+)$//a;
           if ($1 ne '') {
             if ($current->{'contents'}->[-1]->{'text'} eq '') {
               $current->{'contents'}->[-1]->{'text'} = $1;
@@ -4459,7 +4463,7 @@ sub _parse_texi($$$)
                 my ($new_line, $new_line_nr) = _new_line($self, $line_nr);
                 $line .= $new_line if (defined($new_line));
               }
-              $line =~ s/^(\s*)//;
+              $line =~ s/^(\s*)//a;
               if ($1) {
                 $current = _merge_text($self, $current, $1);
               }
@@ -4746,7 +4750,7 @@ sub _parse_texi($$$)
             my $ifvalue_true = 0;
             if ($command eq 'ifclear' or $command eq 'ifset') {
               # REVALUE
-              if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+              if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/a) {
                 my $name = $1;
                 if ((exists($self->{'values'}->{$name}) and $command eq 
'ifset')
                     or (!exists($self->{'values'}->{$name}) 
@@ -4764,7 +4768,7 @@ sub _parse_texi($$$)
             } elsif ($command eq 'ifcommanddefined' 
                      or $command eq 'ifcommandnotdefined') {
               # REMACRO
-              if ($line =~ 
/^\s+([[:alnum:]][[:alnum:]\-]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+              if ($line =~ 
/^\s+([[:alnum:]][[:alnum:]\-]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/a) {
                 my $name = $1;
                 my $command_is_defined = (
                   exists($Texinfo::Common::all_commands{$name})
@@ -4871,7 +4875,7 @@ sub _parse_texi($$$)
                     'type' => 'elided_block',
                     'contents' => []
                   };
-                  while (not $line =~ /^\s*\@end\s+$command/) {
+                  while (not $line =~ /^\s*\@end\s+$command/a) {
                     ($line, $line_nr) = _new_line($self, $line_nr);
                     if (!$line) {
                       # unclosed block
@@ -5042,7 +5046,7 @@ sub _parse_texi($$$)
               } else {
                 $self->_push_context('ct_brace_command', $command);
               }
-              $line =~ s/([^\S\f\n]*)//;
+              $line =~ s/([^\S\f\n]*)//a;
               $current->{'type'} = 'brace_command_context';
               push @{$current->{'contents'}}, { 'type' => 
'empty_spaces_before_argument', 
                             'text' => $1,
@@ -5573,11 +5577,11 @@ sub _parse_special_misc_command($$$$)
   my $remaining;
   if ($command eq 'set') {
     # REVALUE
-    if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\@(c|comment)((\@|\s+).*)?|\s+(.*?))?\s*$/) {
-      if ($line =~ s/\@(c|comment)((\@|\s+).*)?$//) {
+    if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\@(c|comment)((\@|\s+).*)?|\s+(.*?))?\s*$/a) {
+      if ($line =~ s/\@(c|comment)((\@|\s+).*)?$//a) {
         $has_comment = 1;
       }
-      $line =~ /^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\s+(.*?))?\s*$/;
+      $line =~ /^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)(\s+(.*?))?\s*$/a;
       my $name = $1;
       my $arg = $3;
       $arg = '' if (!defined($arg));
@@ -5592,7 +5596,7 @@ sub _parse_special_misc_command($$$$)
     }
   } elsif ($command eq 'clear') {
     # REVALUE
-    if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+    if ($line =~ 
/^\s+([\w\-][^\s{\\}~`\^+"<>|@]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/a) {
       $args = [$1];
       delete $self->{'values'}->{$1};
       $has_comment = 1 if (defined($3));
@@ -5605,7 +5609,7 @@ sub _parse_special_misc_command($$$$)
     }
   } elsif ($command eq 'unmacro') {
     # REMACRO
-    if ($line =~ 
/^\s+([[:alnum:]][[:alnum:]\-]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/) {
+    if ($line =~ 
/^\s+([[:alnum:]][[:alnum:]\-]*)\s*(\@(c|comment)((\@|\s+).*)?)?$/a) {
       $args = [$1];
       delete $self->{'macros'}->{$1};
       $has_comment = 1 if (defined($3));
@@ -5619,11 +5623,11 @@ sub _parse_special_misc_command($$$$)
     }
   } elsif ($command eq 'clickstyle') {
     # REMACRO
-    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/) {
+    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/a) {
       $args = ['@'.$1];
       $self->{'clickstyle'} = $1;
       $remaining = $line;
-      $remaining =~ 
s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+      $remaining =~ 
s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//a;
       $has_comment = 1 if (defined($4));
     } else {
       $self->_line_error(sprintf(__(
@@ -5691,7 +5695,7 @@ sub _parse_line_command_args($$$)
 
   if ($command eq 'alias') {
     # REMACRO
-    if ($line =~ 
s/^([[:alnum:]][[:alnum:]-]*)(\s*=\s*)([[:alnum:]][[:alnum:]-]*)$//) {
+    if ($line =~ 
s/^([[:alnum:]][[:alnum:]-]*)(\s*=\s*)([[:alnum:]][[:alnum:]-]*)$//a) {
       my $new_command = $1;
       my $existing_command = $3;
       $args = [$1, $3];
@@ -5708,7 +5712,8 @@ sub _parse_line_command_args($$$)
 
   } elsif ($command eq 'definfoenclose') {
     # REMACRO
-    if ($line =~ 
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]*)\s*,\s*([^\s,]*)$//) {
+    # FIXME not clear if non ascii spaces are ok in the args
+    if ($line =~ 
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]*)\s*,\s*([^\s,]*)$//a) {
       $args = [$1, $2, $3 ];
       $self->{'definfoenclose'}->{$1} = [ $2, $3 ];
       print STDERR "DEFINFOENCLOSE \@$1: $2, $3\n" if ($self->{'DEBUG'});
@@ -5723,7 +5728,7 @@ sub _parse_line_command_args($$$)
                               __("bad argument to \@%s"), $command), $line_nr);
     }
   } elsif ($command eq 'columnfractions') {
-    my @possible_fractions = split (/\s+/, $line);
+    my @possible_fractions = split (/\s+/a, $line);
     if (!@possible_fractions) {
       $self->_line_error(sprintf(__("empty \@%s"), $command),
                              $line_nr);
@@ -5774,7 +5779,7 @@ sub _parse_line_command_args($$$)
     }
   } elsif ($command eq 'synindex' || $command eq 'syncodeindex') {
     # REMACRO
-    if ($line =~ 
/^([[:alnum:]][[:alnum:]\-]*)\s+([[:alnum:]][[:alnum:]\-]*)$/) {
+    if ($line =~ 
/^([[:alnum:]][[:alnum:]\-]*)\s+([[:alnum:]][[:alnum:]\-]*)$/a) {
       my $index_from = $1;
       my $index_to = $2;
       $self->_line_error(sprintf(__("unknown source index in \@%s: %s"),



reply via email to

[Prev in Thread] Current Thread [Next in Thread]