kernel-doc (6b5b55f6c404fa730a09a8254eb19f5a038afcc2) | kernel-doc (5c98fc0360437327e4034ecfe8b818ad82622100) |
---|---|
1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2007 Randy Dunlap ## --- 168 unchanged lines hidden (view full) --- 177my $local_lt = "\\\\\\\\lt:"; 178my $local_gt = "\\\\\\\\gt:"; 179my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>" 180 181# XML, docbook format 182my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>", 183 $type_constant, "<constant>\$1</constant>", 184 $type_func, "<function>\$1</function>", | 1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2007 Randy Dunlap ## --- 168 unchanged lines hidden (view full) --- 177my $local_lt = "\\\\\\\\lt:"; 178my $local_gt = "\\\\\\\\gt:"; 179my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>" 180 181# XML, docbook format 182my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>", 183 $type_constant, "<constant>\$1</constant>", 184 $type_func, "<function>\$1</function>", |
185 $type_struct, "<structname>\$1</structname>", | 185 $type_struct_xml, "<structname>\$1</structname>", |
186 $type_env, "<envar>\$1</envar>", 187 $type_param, "<parameter>\$1</parameter>" ); | 186 $type_env, "<envar>\$1</envar>", 187 $type_param, "<parameter>\$1</parameter>" ); |
188my $blankline_xml = "</para><para>\n"; | 188my $blankline_xml = $local_lt . "/para" . $local_gt . $local_lt . "para" . $local_gt . "\n"; |
189 190# gnome, docbook format 191my %highlights_gnome = ( $type_constant, "<replaceable class=\"option\">\$1</replaceable>", 192 $type_func, "<function>\$1</function>", 193 $type_struct, "<structname>\$1</structname>", 194 $type_env, "<envar>\$1</envar>", 195 $type_param, "<parameter>\$1</parameter>" ); 196my $blankline_gnome = "</para><para>\n"; --- 192 unchanged lines hidden (view full) --- 389 my $line; 390 391# DEBUG 392# if (!defined $contents) { 393# use Carp; 394# confess "output_highlight got called with no args?\n"; 395# } 396 | 189 190# gnome, docbook format 191my %highlights_gnome = ( $type_constant, "<replaceable class=\"option\">\$1</replaceable>", 192 $type_func, "<function>\$1</function>", 193 $type_struct, "<structname>\$1</structname>", 194 $type_env, "<envar>\$1</envar>", 195 $type_param, "<parameter>\$1</parameter>" ); 196my $blankline_gnome = "</para><para>\n"; --- 192 unchanged lines hidden (view full) --- 389 my $line; 390 391# DEBUG 392# if (!defined $contents) { 393# use Carp; 394# confess "output_highlight got called with no args?\n"; 395# } 396 |
397 if ($output_mode eq "html") { | 397 if ($output_mode eq "html" || $output_mode eq "xml") { |
398 $contents = local_unescape($contents); 399 # convert data read & converted thru xml_escape() into &xyz; format: 400 $contents =~ s/\\\\\\/&/g; 401 } 402# print STDERR "contents b4:$contents\n"; 403 eval $dohighlight; 404 die $@ if $@; 405# print STDERR "contents af:$contents\n"; --- 1602 unchanged lines hidden --- | 398 $contents = local_unescape($contents); 399 # convert data read & converted thru xml_escape() into &xyz; format: 400 $contents =~ s/\\\\\\/&/g; 401 } 402# print STDERR "contents b4:$contents\n"; 403 eval $dohighlight; 404 die $@ if $@; 405# print STDERR "contents af:$contents\n"; --- 1602 unchanged lines hidden --- |