[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8155] save @verb delimiter in extra hash
From: |
gavinsmith0123 |
Subject: |
[8155] save @verb delimiter in extra hash |
Date: |
Sun, 2 Sep 2018 07:28:05 -0400 (EDT) |
Revision: 8155
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8155
Author: gavin
Date: 2018-09-02 07:28:04 -0400 (Sun, 02 Sep 2018)
Log Message:
-----------
save @verb delimiter in extra hash
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Texinfo.pm
trunk/tp/Texinfo/Convert/TexinfoXML.pm
trunk/tp/Texinfo/Parser.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-09-02 10:58:06 UTC (rev 8154)
+++ trunk/ChangeLog 2018-09-02 11:28:04 UTC (rev 8155)
@@ -1,5 +1,13 @@
2018-09-02 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (_parse_texi, _close_brace_command),
+ * tp/Texinfo/Convert/Texinfo.pm (_expand_cmd_args_to_texi),
+ * tp/Texinfo/Convert/TexinfoXML.pm (_convert):
+ Save the delimiter character of @verb as the 'delimiter' extra
+ value, instead of putting in 'type'.
+
+2018-09-02 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm (module documentation): Update.
2018-09-02 Gavin Smith <address@hidden>
Modified: trunk/tp/Texinfo/Convert/Texinfo.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Texinfo.pm 2018-09-02 10:58:06 UTC (rev 8154)
+++ trunk/tp/Texinfo/Convert/Texinfo.pm 2018-09-02 11:28:04 UTC (rev 8155)
@@ -187,7 +187,7 @@
or $cmd->{'args'}->[0]->{'type'} eq
'brace_command_context'));
$result .= '{' if ($braces);
if ($cmdname eq 'verb') {
- $result .= $cmd->{'type'};
+ $result .= $cmd->{'extra'}->{'delimiter'};
}
if ($cmd->{'extra'}
and $cmd->{'extra'}->{'spaces_before_argument'}) {
@@ -209,7 +209,7 @@
}
}
if ($cmdname eq 'verb') {
- $result .= $cmd->{'type'};
+ $result .= $cmd->{'extra'}->{'delimiter'};
}
#die "Shouldn't have args: $cmdname\n";
$result .= '}' if ($braces);
Modified: trunk/tp/Texinfo/Convert/TexinfoXML.pm
===================================================================
--- trunk/tp/Texinfo/Convert/TexinfoXML.pm 2018-09-02 10:58:06 UTC (rev
8154)
+++ trunk/tp/Texinfo/Convert/TexinfoXML.pm 2018-09-02 11:28:04 UTC (rev
8155)
@@ -1145,7 +1145,7 @@
# first argument
my $attribute = [];
if ($root->{'cmdname'} eq 'verb') {
- push @$attribute, ('delimiter', $root->{'type'});
+ push @$attribute, ('delimiter', $root->{'extra'}->{'delimiter'});
} elsif ($root->{'cmdname'} eq 'anchor') {
my $anchor_name;
if (defined($root->{'extra'}->{'normalized'})) {
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2018-09-02 10:58:06 UTC (rev 8154)
+++ trunk/tp/Texinfo/Parser.pm 2018-09-02 11:28:04 UTC (rev 8155)
@@ -1278,7 +1278,8 @@
my ($self, $current, $line_nr, $closed_command,
$interrupting_command) = @_;
- if ($current->{'cmdname'} ne 'verb' or $current->{'type'} eq '') {
+ if ($current->{'cmdname'} ne 'verb'
+ or $current->{'extra'}->{'delimiter'} eq '') {
if (defined($closed_command)) {
$self->_command_error($current, $line_nr,
__("address@hidden %s seen before address@hidden closing brace"),
@@ -1295,7 +1296,7 @@
} else {
$self->_command_error($current, $line_nr,
__("address@hidden missing closing delimiter sequence: %s}"),
- $current->{'cmdname'}, $current->{'type'});
+ $current->{'cmdname'}, $current->{'extra'}->{'delimiter'});
}
$current = $current->{'parent'};
return $current;
@@ -3836,17 +3837,17 @@
} elsif ($current->{'parent'} and $current->{'parent'}->{'cmdname'}
and $current->{'parent'}->{'cmdname'} eq 'verb') {
# collect the first character if not already done
- if (!defined($current->{'parent'}->{'type'})) {
+ if (!defined($current->{'parent'}->{'extra'}->{'delimiter'})) {
if ($line =~ /^$/) {
- $current->{'parent'}->{'type'} = '';
+ $current->{'parent'}->{'extra'}->{'delimiter'} = '';
$self->line_error(sprintf(
__("address@hidden without associated character"), 'verb'),
$line_nr);
} else {
$line =~ s/^(.)//;
- $current->{'parent'}->{'type'} = $1;
+ $current->{'parent'}->{'extra'}->{'delimiter'} = $1;
}
}
- my $char = quotemeta($current->{'parent'}->{'type'});
+ my $char = quotemeta($current->{'parent'}->{'extra'}->{'delimiter'});
if ($line =~ s/^(.*?)$char\}/\}/) {
push @{$current->{'contents'}},
{ 'text' => $1, 'type' => 'raw', 'parent' => $current }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8155] save @verb delimiter in extra hash,
gavinsmith0123 <=