[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8202] don't call _trim_spaces_comment_from_content
From: |
gavinsmith0123 |
Subject: |
[8202] don't call _trim_spaces_comment_from_content |
Date: |
Sat, 22 Sep 2018 09:00:14 -0400 (EDT) |
Revision: 8202
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8202
Author: gavin
Date: 2018-09-22 09:00:13 -0400 (Sat, 22 Sep 2018)
Log Message:
-----------
don't call _trim_spaces_comment_from_content
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/02coverage.t
trunk/tp/t/results/coverage/test_errormsg.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-09-22 12:50:47 UTC (rev 8201)
+++ trunk/ChangeLog 2018-09-22 13:00:13 UTC (rev 8202)
@@ -1,5 +1,12 @@
2018-09-22 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (_parse_texi) <@errormsg>: Don't call
+ _trim_spaces_comment_from_content.
+ * t/02coverage.t (test_errormsg): Add use of @errormsg with
+ whitespace surrounding error message.
+
+2018-09-22 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm (_parse_texi) <',' seen for inline commands>:
Use text in 'args' directly instead of calling
_trim_spaces_comment_from_content.
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2018-09-22 12:50:47 UTC (rev 8201)
+++ trunk/tp/Texinfo/Parser.pm 2018-09-22 13:00:13 UTC (rev 8202)
@@ -5122,9 +5122,7 @@
$current_command->{'cmdname'}), $line_nr);
}
} elsif ($current->{'parent'}->{'cmdname'} eq 'errormsg') {
- my @contents = @{$current->{'contents'}};
- _trim_spaces_comment_from_content (address@hidden);
- my $error_message_text = $contents[0]->{'text'};
+ my $error_message_text = $current->{'contents'}->[0]->{'text'};
$self->line_error($error_message_text, $line_nr)
if $error_message_text;
} elsif ($current->{'parent'}->{'cmdname'} eq 'U') {
Modified: trunk/tp/t/02coverage.t
===================================================================
--- trunk/tp/t/02coverage.t 2018-09-22 12:50:47 UTC (rev 8201)
+++ trunk/tp/t/02coverage.t 2018-09-22 13:00:13 UTC (rev 8202)
@@ -548,6 +548,7 @@
['test_errormsg',
'Some text
@errormsg{Text @~e @code{code}}
address@hidden with surrounding spaces }
'],
['unknown_accents',
'@"X @"x @"Q @"Y
Modified: trunk/tp/t/results/coverage/test_errormsg.pl
===================================================================
--- trunk/tp/t/results/coverage/test_errormsg.pl 2018-09-22 12:50:47 UTC
(rev 8201)
+++ trunk/tp/t/results/coverage/test_errormsg.pl 2018-09-22 13:00:13 UTC
(rev 8202)
@@ -86,6 +86,37 @@
'parent' => {},
'text' => '
'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'with surrounding spaces'
+ }
+ ],
+ 'extra' => {
+ 'spaces_after_argument' => ' ',
+ 'spaces_before_argument' => ' '
+ },
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'errormsg',
+ 'contents' => [],
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+'
}
],
'parent' => {},
@@ -108,15 +139,21 @@
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'line_nr'} =
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'line_nr'};
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[1]{'parent'} =
$result_trees{'test_errormsg'}{'contents'}[0];
$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[2]{'parent'} =
$result_trees{'test_errormsg'}{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[3]{'args'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[3]{'args'}[0]{'parent'}
= $result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[3];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[3]{'parent'} =
$result_trees{'test_errormsg'}{'contents'}[0];
+$result_trees{'test_errormsg'}{'contents'}[0]{'contents'}[4]{'parent'} =
$result_trees{'test_errormsg'}{'contents'}[0];
$result_trees{'test_errormsg'}{'contents'}[0]{'parent'} =
$result_trees{'test_errormsg'};
$result_texis{'test_errormsg'} = 'Some text
@errormsg{Text @~e @code{code}}
address@hidden with surrounding spaces }
';
$result_texts{'test_errormsg'} = 'Some text
+
';
$result_errors{'test_errormsg'} = [
@@ -146,6 +183,15 @@
'macro' => '',
'text' => 'Text ',
'type' => 'error'
+ },
+ {
+ 'error_line' => ':3: with surrounding spaces
+',
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => '',
+ 'text' => 'with surrounding spaces',
+ 'type' => 'error'
}
];
@@ -157,16 +203,19 @@
$result_converted{'html_text'}->{'test_errormsg'} = '<p>Some text
+
</p>';
$result_converted{'xml'}->{'test_errormsg'} = '<para>Some text
<errormsg>Text <accent type="tilde" bracketed="off">e</accent>
<code>code</code></errormsg>
+<errormsg spaces=" ">with surrounding spaces </errormsg>
</para>';
$result_converted{'docbook'}->{'test_errormsg'} = '<para>Some text
+
</para>';
1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8202] don't call _trim_spaces_comment_from_content,
gavinsmith0123 <=