[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8231] use args instead of misc_content
From: |
gavinsmith0123 |
Subject: |
[8231] use args instead of misc_content |
Date: |
Mon, 24 Sep 2018 09:01:51 -0400 (EDT) |
Revision: 8231
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8231
Author: gavin
Date: 2018-09-24 09:01:50 -0400 (Mon, 24 Sep 2018)
Log Message:
-----------
use args instead of misc_content
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Converter.pm
trunk/tp/Texinfo/Convert/DocBook.pm
trunk/tp/Texinfo/Convert/HTML.pm
trunk/tp/Texinfo/Convert/Info.pm
trunk/tp/Texinfo/Convert/Plaintext.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-09-24 11:53:57 UTC (rev 8230)
+++ trunk/ChangeLog 2018-09-24 13:01:50 UTC (rev 8231)
@@ -1,5 +1,16 @@
2018-09-24 Gavin Smith <address@hidden>
+ * tp/Texinfo/Convert/Converter.pm
+ (_sectioning_command_normalized_filename),
+ * tp/Texinfo/Convert/DocBook.pm (_convert),
+ * tp/Texinfo/Convert/HTML.pm
+ (command_text _convert_quotation_command, output),
+ * tp/Texinfo/Convert/Info.pm (_info_header),
+ * tp/Texinfo/Convert/Plaintext.pm (_contents, _convert):
+ Use 'args' instead of 'misc_content'.
+
+2018-09-24 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm (_end_line) <misc command>:
Do not call _trim_spaces_comment_from_content. This leads to a
change in the 'misc_args' in a few cases of invalid nesting of
Modified: trunk/tp/Texinfo/Convert/Converter.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Converter.pm 2018-09-24 11:53:57 UTC (rev
8230)
+++ trunk/tp/Texinfo/Convert/Converter.pm 2018-09-24 13:01:50 UTC (rev
8231)
@@ -541,7 +541,7 @@
and !$self->get_conf('USE_UNIDECODE'));
my $normalized_name =
Texinfo::Convert::NodeNameNormalization::transliterate_texinfo(
- {'contents' => $command->{'extra'}->{'misc_content'}},
+ {'contents' => $command->{'args'}->[0]->{'contents'}},
$no_unidecode);
my $filename = $self->_id_to_filename($normalized_name);
Modified: trunk/tp/Texinfo/Convert/DocBook.pm
===================================================================
--- trunk/tp/Texinfo/Convert/DocBook.pm 2018-09-24 11:53:57 UTC (rev 8230)
+++ trunk/tp/Texinfo/Convert/DocBook.pm 2018-09-24 13:01:50 UTC (rev 8231)
@@ -591,7 +591,7 @@
and $root->{'parent'}->{'type'} eq 'table_term') {
my $converted_tree = $self->_table_item_content_tree($root,
- $root->{'extra'}->{'misc_content'});
+ $root->{'args'}->[0]->{'contents'});
$result .= "<term>";
$result .= $self->_index_entry($root);
@@ -1246,9 +1246,9 @@
if ($root->{'extra'}) {
if ($root->{'extra'}->{'authors'}) {
foreach my $author (@{$root->{'extra'}->{'authors'}}) {
- if ($author->{'extra'} and $author->{'extra'}->{'misc_content'})
{
+ if ($author->{'extra'} and $author->{'args'}->[0]->{'contents'})
{
$appended .= '<attribution>'.$self->_convert(
- {'contents' => $author->{'extra'}->{'misc_content'}})
+ {'contents' => $author->{'args'}->[0]->{'contents'}})
."</attribution>\n";
}
}
Modified: trunk/tp/Texinfo/Convert/HTML.pm
===================================================================
--- trunk/tp/Texinfo/Convert/HTML.pm 2018-09-24 11:53:57 UTC (rev 8230)
+++ trunk/tp/Texinfo/Convert/HTML.pm 2018-09-24 13:01:50 UTC (rev 8231)
@@ -521,7 +521,7 @@
return '';
}
} else {
- if (!$command->{'extra'}->{'misc_content'}) {
+ if (!$command->{'args'}->[0]->{'contents'}) {
cluck "No misc_content: "
.Texinfo::Common::_print_current($command);
}
@@ -533,20 +533,20 @@
{'number' => {'text' => $command->{'number'}},
'section_title'
=> {'contents'
- =>
$command->{'extra'}->{'misc_content'}}});
+ =>
$command->{'args'}->[0]->{'contents'}}});
} else {
$tree = $self->gdt('{number} {section_title}',
{'number' => {'text' => $command->{'number'}},
'section_title'
=> {'contents'
- =>
$command->{'extra'}->{'misc_content'}}});
+ =>
$command->{'args'}->[0]->{'contents'}}});
}
} else {
- $tree = {'contents' => address@hidden>{'extra'}->{'misc_content'}}]};
+ $tree = {'contents' => address@hidden>{'args'}->[0]->{'contents'}}]};
}
$target->{'tree_nonumber'}
- = {'contents' => $command->{'extra'}->{'misc_content'}};
+ = {'contents' => $command->{'args'}->[0]->{'contents'}};
}
$target->{'tree'} = $tree;
} else {
@@ -2917,7 +2917,7 @@
if ($command->{'extra'} and $command->{'extra'}->{'authors'}) {
foreach my $author (@{$command->{'extra'}->{'authors'}}) {
my $centered_author = $self->gdt("address@hidden --- address@hidden",
- {'author' => $author->{'extra'}->{'misc_content'}});
+ {'author' => $author->{'args'}->[0]->{'contents'}});
$centered_author->{'parent'} = $command;
$attribution .= $self->convert_tree($centered_author);
}
@@ -6872,12 +6872,12 @@
'shorttitlepage', 'top') {
if ($self->{'extra'}->{$fulltitle_command}) {
my $command = $self->{'extra'}->{$fulltitle_command};
- next if (!$command->{'extra'}
- or (!$command->{'extra'}->{'misc_content'}
+ next if (!$command->{'args'}
+ or (!$command->{'args'}->[0]->{'contents'}
or $command->{'extra'}->{'missing_argument'}));
print STDERR "Using $fulltitle_command as title\n"
if ($self->get_conf('DEBUG'));
- $fulltitle = {'contents' => $command->{'extra'}->{'misc_content'}};
+ $fulltitle = {'contents' => $command->{'args'}->[0]->{'contents'}};
last;
}
}
@@ -6894,7 +6894,7 @@
next if ($command->{'extra'}
and $command->{'extra'}->{'missing_argument'});
$self->{'simpletitle_tree'} =
- {'contents' => $command->{'extra'}->{'misc_content'}};
+ {'contents' => $command->{'args'}->[0]->{'contents'}};
last;
}
}
Modified: trunk/tp/Texinfo/Convert/Info.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Info.pm 2018-09-24 11:53:57 UTC (rev 8230)
+++ trunk/tp/Texinfo/Convert/Info.pm 2018-09-24 13:01:50 UTC (rev 8231)
@@ -342,10 +342,10 @@
$self->{'ignored_commands'}->{'direntry'} = 0;
foreach my $command (@{$self->{'info'}->{'dircategory_direntry'}}) {
if ($command->{'cmdname'} eq 'dircategory') {
- if ($command->{'extra'}
- and defined($command->{'extra'}->{'misc_content'})) {
+ if ($command->{'args'} and @{$command->{'args'}}
+ and defined($command->{'args'}->[0]->{'contents'})) {
my $dircategory = "INFO-DIR-SECTION ".$self->convert_line(
- {'contents' => $command->{'extra'}->{'misc_content'}});
+ {'contents' => $command->{'args'}->[0]->{'contents'}});
$result .= $self->ensure_end_of_line($dircategory);
}
$self->{'empty_lines_count'} = 0;
Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm 2018-09-24 11:53:57 UTC (rev
8230)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm 2018-09-24 13:01:50 UTC (rev
8231)
@@ -1055,15 +1055,15 @@
$section_title_tree = $self->gdt('Appendix {number} {section_title}',
{'number' => {'text' => $section->{'number'}},
'section_title'
- => {'contents' =>
$section->{'extra'}->{'misc_content'}}});
+ => {'contents' =>
$section->{'args'}->[0]->{'contents'}}});
} else {
$section_title_tree = $self->gdt('{number} {section_title}',
{'number' => {'text' => $section->{'number'}},
'section_title'
- => {'contents' =>
$section->{'extra'}->{'misc_content'}}});
+ => {'contents' =>
$section->{'args'}->[0]->{'contents'}}});
}
} else {
- $section_title_tree = {'contents' =>
$section->{'extra'}->{'misc_content'}};
+ $section_title_tree = {'contents' =>
$section->{'args'}->[0]->{'contents'}};
}
my $section_title = $self->convert_line(
{'contents' => [$section_title_tree],
@@ -2433,16 +2433,17 @@
# use settitle for empty @top
# ignore @part
my $contents;
- if ($root->{'extra'}->{'misc_content'}
- and @{$root->{'extra'}->{'misc_content'}}
+ if ($root->{'args'}->[0]->{'contents'}
+ and @{$root->{'args'}->[0]->{'contents'}}
and $command ne 'part') {
- $contents = $root->{'extra'}->{'misc_content'};
+ $contents = $root->{'args'}->[0]->{'contents'};
} elsif ($command eq 'top'
and $self->{'extra'}->{'settitle'}
- and $self->{'extra'}->{'settitle'}->{'extra'}
- and $self->{'extra'}->{'settitle'}->{'extra'}->{'misc_content'}
- and @{$self->{'extra'}->{'settitle'}->{'extra'}->{'misc_content'}}) {
- $contents =
$self->{'extra'}->{'settitle'}->{'extra'}->{'misc_content'};
+ and $self->{'extra'}->{'settitle'}->{'args'}
+ and @{$self->{'extra'}->{'settitle'}->{'args'}}
+ and $self->{'extra'}->{'settitle'}->{'args'}->[0]->{'contents'}
+ and @{$self->{'extra'}->{'settitle'}->{'args'}->[0]->{'contents'}}) {
+ $contents =
$self->{'extra'}->{'settitle'}->{'args'}->[0]->{'contents'};
}
if ($contents) {
@@ -2471,10 +2472,11 @@
and $root->{'args'} and $root->{'args'}->[0]
and $root->{'args'}->[0]->{'type'}
and $root->{'args'}->[0]->{'type'} eq 'misc_line_arg') {
- if ($root->{'extra'} and $root->{'extra'}->{'misc_content'}) {
+ if ($root->{'args'} and @{$root->{'args'}}
+ and $root->{'args'}->[0]->{'contents'}) {
my $converted_tree = $self->_table_item_content_tree($root,
- $root->{'extra'}->{'misc_content'});
+ $root->{'args'}->[0]->{'contents'});
$converted_tree->{'type'} = 'frenchspacing';
$result = $self->convert_line($converted_tree,
@@ -2537,7 +2539,7 @@
'locations' => []};
$result = $self->convert_line (
{'type' => 'frenchspacing',
- 'contents' => $root->{'extra'}->{'misc_content'}},
+ 'contents' => $root->{'args'}->[0]->{'contents'}},
{'indent_length' => 0});
if ($result ne '') {
$result = $self->ensure_end_of_line($result);
@@ -2553,11 +2555,11 @@
return $result;
} elsif ($command eq 'exdent') {
if
($self->{'preformatted_context_commands'}->{$self->{'context'}->[-1]}) {
- $result = $self->convert_unfilled({'contents' =>
$root->{'extra'}->{'misc_content'}},
+ $result = $self->convert_unfilled({'contents' =>
$root->{'args'}->[0]->{'contents'}},
{'indent_level'
=> $self->{'format_context'}->[-1]->{'indent_level'} -1});
} else {
- $result = $self->convert_line({'contents' =>
$root->{'extra'}->{'misc_content'}},
+ $result = $self->convert_line({'contents' =>
$root->{'args'}->[0]->{'contents'}},
{'indent_level'
=> $self->{'format_context'}->[-1]->{'indent_level'} -1});
}
@@ -3234,7 +3236,7 @@
foreach my $author (@{$root->{'extra'}->{'authors'}}) {
$result .= _convert($self,
$self->gdt("address@hidden --- address@hidden",
- {'author' => $author->{'extra'}->{'misc_content'}}));
+ {'author' => $author->{'args'}->[0]->{'contents'}}));
}
} elsif (($command eq 'multitable')) {
$self->{'document_context'}->[-1]->{'in_multitable'}--;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8231] use args instead of misc_content,
gavinsmith0123 <=