[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Structuring.pm t/automatic_n...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Structuring.pm t/automatic_n... |
Date: |
Fri, 24 Feb 2012 18:38:05 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/02/24 18:38:05
Modified files:
tp/Texinfo : Structuring.pm
tp/t : automatic_nodes.t
Log message:
Protect comma in newly created node.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.114&r2=1.115
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/automatic_nodes.t?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- Texinfo/Structuring.pm 24 Feb 2012 00:02:41 -0000 1.114
+++ Texinfo/Structuring.pm 24 Feb 2012 18:38:04 -0000 1.115
@@ -1242,12 +1242,14 @@
}
# prepare a new node and register it
-# FIXME protect comma and punctuation?
+# FIXME protect punctuation?
sub _new_node($$)
{
my $self = shift;
my $node_tree = shift;
+ $node_tree = Texinfo::Common::protect_comma_in_tree($node_tree);
+
return undef if (!$node_tree->{'contents'}
or !scalar(@{$node_tree->{'contents'}}));
Index: t/automatic_nodes.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/automatic_nodes.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/automatic_nodes.t 24 Feb 2012 00:02:41 -0000 1.1
+++ t/automatic_nodes.t 24 Feb 2012 18:38:04 -0000 1.2
@@ -1,7 +1,7 @@
use strict;
use Test::More;
-BEGIN { plan tests => 7 };
+BEGIN { plan tests => 10 };
use lib 'maintain/lib/Unicode-EastAsianWidth/lib/';
use lib 'maintain/lib/libintl-perl/lib/';
@@ -42,3 +42,6 @@
test_new_node ('a node @code{in code} @c comment
', 'a-node-in-code-', '@node a node @code{in code} @c comment
', 'complex');
+test_new_node ('a ,, node @code{a,b,}', 'a-_002c_002c-node-a_002cb_002c',
+'@node a @address@hidden node @address@hidden@comma{}}
+', 'with comma');
- texinfo/tp Texinfo/Structuring.pm t/automatic_n...,
Patrice Dumas <=