[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert HTML.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert HTML.pm |
Date: |
Sun, 24 Apr 2011 21:31:03 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/04/24 21:31:03
Modified files:
tp/Texinfo/Convert: HTML.pm
Log message:
Convert itemize.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.34&r2=1.35
Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- HTML.pm 24 Apr 2011 21:04:48 -0000 1.34
+++ HTML.pm 24 Apr 2011 21:31:03 -0000 1.35
@@ -1373,6 +1373,51 @@
$default_commands_conversion{'menu'} = \&_convert_menu;
$default_commands_conversion{'detailmenu'} = \&_convert_menu;
+sub _convert_itemize($$$$)
+{
+ my $self = shift;
+ my $cmdname = shift;
+ my $command = shift;
+ my $contents = shift;
+
+ if ($command->{'extra'}->{'command_as_argument'}
+ and $command->{'extra'}->{'command_as_argument'}->{'cmdname'} eq
'bullet') {
+ return "<ul>\n" . $contents. "</ul>\n";
+ } else {
+ return attribute_class('ul',$NO_BULLET_LIST_CLASS).">\n"
+ . $contents . "</ul>\n";
+ }
+}
+
+$default_commands_conversion{'itemize'} = \&_convert_itemize;
+
+sub _convert_item($$$$)
+{
+ my $self = shift;
+ my $cmdname = shift;
+ my $command = shift;
+ my $contents = shift;
+
+ if ($command->{'parent'}
+ and $command->{'parent'}->{'cmdname'} eq 'itemize') {
+ my $prepend ;
+ my $itemize = $command->{'parent'};
+ if ($itemize->{'extra'}->{'command_as_argument'}
+ and $itemize->{'extra'}->{'command_as_argument'}->{'cmdname'} eq
'bullet') {
+ $prepend = '';
+ } else {
+ $prepend = $self->convert_tree(
+ {'contents' => $itemize->{'extra'}->{'block_command_line_contents'}});
+ }
+ if ($contents =~ /\S/) {
+ return '<li>' . $prepend . $contents . '</li>';
+ } else {
+ return '';
+ }
+ }
+ return 'TODO';
+}
+$default_commands_conversion{'item'} = \&_convert_item;
my %default_types_conversion;
@@ -3451,55 +3496,6 @@
return $result;
}
-sub _menu($$)
-{
- my $self = shift;
- my $menu_command = shift;
-
- if ($menu_command->{'cmdname'} eq 'menu') {
- my $result = "* Menu:\n\n";
- $self->_add_text_count($result);
- $self->_add_lines_count(2);
- return $result;
- } else {
- return '';
- }
-}
-
-sub _printindex($$)
-{
- my $self = shift;
- my $printindex = shift;
- return ('');
-}
-
-sub _node($$)
-{
- my $self = shift;
- my $node = shift;
-
- return '';
-}
-
-# no error in plaintext
-sub _error_outside_of_any_node($$)
-{
- my $self = shift;
- my $root = shift;
-}
-
-sub _anchor($$)
-{
- my $self = shift;
- my $anchor = shift;
-
- if (!($self->{'multiple_pass'} or $self->{'in_copying_header'})) {
- $self->_add_location($anchor);
- $self->_error_outside_of_any_node($anchor);
- }
- return '';
-}
-
sub _image($$)
{
my $self = shift;
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/02
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/03
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/03
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/13
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/14
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/17
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/17
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/18
- texinfo/tp/Texinfo/Convert HTML.pm,
Patrice Dumas <=
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/25
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/29
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30