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: Sun, 29 May 2011 15:59:05 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/05/29 15:59:05

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

Log message:
        Handle @anchor.

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

Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- HTML.pm     29 May 2011 14:57:48 -0000      1.65
+++ HTML.pm     29 May 2011 15:59:04 -0000      1.66
@@ -864,7 +864,7 @@
 # default specification of arguments formatting
 my %default_commands_args = (
   'email' => [['code'], ['normal']],
-  'anchor' => [['string']],
+  'anchor' => [['codestring']],
   'uref' => [['codestring'], ['normal'], ['normal']],
   'url' => [['codestring'], ['normal'], ['normal']],
   'printindex' => [[]],
@@ -1146,6 +1146,21 @@
 
 $default_commands_conversion{'email'} = \&_convert_email_command;
 
+sub _convert_anchor_command($$$$)
+{
+  my $self = shift;
+  my $cmdname = shift;
+  my $command = shift;
+  my $args = shift;
+
+  my $id = $self->command_id ($command);
+  if (defined($id)) {
+    return "<a name=\"$id\"></a>";
+  }
+  return '';
+}
+
+$default_commands_conversion{'anchor'} = \&_convert_anchor_command;
 sub _convert_uref_command($$$$)
 {
   my $self = shift;



reply via email to

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