Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330144
b: refs/heads/master
c: e314ba3
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Santos authored and Linus Torvalds committed Oct 5, 2012
1 parent 9a86118 commit 5422320
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 654784284430bf2739985914b65e09c7c35a7273
refs/heads/master: e314ba3130940cb58b533b20969a6ee9b12435ed
11 changes: 10 additions & 1 deletion trunk/scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ my $dohighlight = "";

my $verbose = 0;
my $output_mode = "man";
my $output_preformatted = 0;
my $no_doc_sections = 0;
my %highlights = %highlights_man;
my $blankline = $blankline_man;
Expand Down Expand Up @@ -460,7 +461,9 @@ sub output_highlight {

foreach $line (split "\n", $contents) {
if ($line eq ""){
print $lineprefix, local_unescape($blankline);
if (! $output_preformatted) {
print $lineprefix, local_unescape($blankline);
}
} else {
$line =~ s/\\\\\\/\&/g;
if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
Expand Down Expand Up @@ -643,10 +646,12 @@ sub output_section_xml(%) {
print "<title>$section</title>\n";
if ($section =~ m/EXAMPLE/i) {
print "<informalexample><programlisting>\n";
$output_preformatted = 1;
} else {
print "<para>\n";
}
output_highlight($args{'sections'}{$section});
$output_preformatted = 0;
if ($section =~ m/EXAMPLE/i) {
print "</programlisting></informalexample>\n";
} else {
Expand Down Expand Up @@ -949,10 +954,12 @@ sub output_blockhead_xml(%) {
}
if ($section =~ m/EXAMPLE/i) {
print "<example><para>\n";
$output_preformatted = 1;
} else {
print "<para>\n";
}
output_highlight($args{'sections'}{$section});
$output_preformatted = 0;
if ($section =~ m/EXAMPLE/i) {
print "</para></example>\n";
} else {
Expand Down Expand Up @@ -1028,10 +1035,12 @@ sub output_function_gnome {
print "<simplesect>\n <title>$section</title>\n";
if ($section =~ m/EXAMPLE/i) {
print "<example><programlisting>\n";
$output_preformatted = 1;
} else {
}
print "<para>\n";
output_highlight($args{'sections'}{$section});
$output_preformatted = 0;
print "</para>\n";
if ($section =~ m/EXAMPLE/i) {
print "</programlisting></example>\n";
Expand Down

0 comments on commit 5422320

Please sign in to comment.