texinfo-commits
[Top][All Lists]
Advanced

[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: Mon, 09 May 2011 19:43:40 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/05/09 19:43:40

Modified files:
        tp/Texinfo/Convert: HTML.pm 

Log message:
        Handle @sp.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.57&r2=1.58

Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- HTML.pm     9 May 2011 19:30:17 -0000       1.57
+++ HTML.pm     9 May 2011 19:43:40 -0000       1.58
@@ -865,6 +865,7 @@
   'uref' => [['codestring'], ['normal'], ['normal']],
   'url' => [['codestring'], ['normal'], ['normal']],
   'printindex' => [[]],
+  'sp' => [[]],
   'inforef' => [['code'],['normal'],['text']],
   'xref' => [['code'],['normal'],['normal'],['text'],['normal']],
   'pxref' => [['code'],['normal'],['normal'],['text'],['normal']],
@@ -1694,6 +1695,25 @@
 $default_commands_conversion{'verbatiminclude'} 
   = \&_convert_verbatiminclude_command;
 
+sub _convert_sp_command($$$$)
+{
+  my $self = shift;
+  my $cmdname = shift;
+  my $command = shift;
+  my $args = shift;
+
+  if (defined($command->{'extra'}->{'misc_args'}->[0])) {
+    my $sp_nr = $command->{'extra'}->{'misc_args'}->[0];
+    if ($self->in_preformatted()) {
+      return "\n" x $sp_nr;
+    } else {
+      return "<br>\n" x $sp_nr;
+    }
+  }
+}
+
+$default_commands_conversion{'sp'} = \&_convert_sp_command;
+
 my $html_menu_entry_index;
 sub _convert_menu_command($$$$)
 {
@@ -3064,7 +3084,7 @@
       and defined($self->{'misc_elements_targets'}->{'Top'})) {
     $target_base = $self->{'misc_elements_targets'}->{'Top'};
   }
-  my $nr=0;
+  my $nr=1;
   my $target = $target_base;
   while ($self->{'ids'}->{$target}) {
     $target = $target_base.'-'.$nr;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]