texinfo-commits
[Top][All Lists]
Advanced

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

[7097] Don't permit trailing text after a numeric argument


From: Gavin D. Smith
Subject: [7097] Don't permit trailing text after a numeric argument
Date: Sun, 03 Apr 2016 19:50:55 +0000

Revision: 7097
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7097
Author:   gavin
Date:     2016-04-03 19:50:55 +0000 (Sun, 03 Apr 2016)
Log Message:
-----------
Don't permit trailing text after a numeric argument

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm
    trunk/tp/t/results/misc_commands/many_lines.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2016-04-03 19:41:46 UTC (rev 7096)
+++ trunk/ChangeLog     2016-04-03 19:50:55 UTC (rev 7097)
@@ -1,5 +1,10 @@
 2016-04-03  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_parse_line_command_args) <@exampleindent>:
+       Don't permit trailing text after a numeric argument.
+
+2016-04-03  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/Parser.pm: Use "closing brace" instead of "close 
        brace" in messages, and use "the beginning of a line" instead of 
        "a line beginning".

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2016-04-03 19:41:46 UTC (rev 7096)
+++ trunk/tp/Texinfo/Parser.pm  2016-04-03 19:50:55 UTC (rev 7097)
@@ -5979,7 +5979,7 @@
                                            $line), $line_nr);
     }
   } elsif ($command eq 'exampleindent') {
-    if ($line =~ /^([0-9]+)/) {
+    if ($line =~ /^([0-9]+)$/) {
       $args = [$1];
     } elsif ($line =~ /^(asis)$/) {
       $args = [$1];

Modified: trunk/tp/t/results/misc_commands/many_lines.pl
===================================================================
--- trunk/tp/t/results/misc_commands/many_lines.pl      2016-04-03 19:41:46 UTC 
(rev 7096)
+++ trunk/tp/t/results/misc_commands/many_lines.pl      2016-04-03 19:50:55 UTC 
(rev 7097)
@@ -809,9 +809,6 @@
           ],
           'cmdname' => 'exampleindent',
           'extra' => {
-            'misc_args' => [
-              '6'
-            ],
             'spaces_after_command' => {}
           },
           'line_nr' => {
@@ -1963,6 +1960,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':25: @exampleindent arg must be numeric/`asis\', not `6 
on line following exampleindent\'
+',
+    'file_name' => '',
+    'line_nr' => 25,
+    'macro' => '',
+    'text' => '@exampleindent arg must be numeric/`asis\', not `6 on line 
following exampleindent\'',
+    'type' => 'error'
+  },
+  {
     'error_line' => ':26: warning: @exampleindent should only appear at the 
beginning of a line
 ',
     'file_name' => '',




reply via email to

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