Skip to content

Commit

Permalink
[PATCH] DocBook: use <informalexample> for examples
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Rich Walker authored and Linus Torvalds committed May 1, 2005
1 parent 67be2dd commit c73894c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,20 @@ sub output_section_xml(%) {
# print out each section
$lineprefix=" ";
foreach $section (@{$args{'sectionlist'}}) {
print "<refsect1>\n <title>$section</title>\n <para>\n";
print "<refsect1>\n";
print "<title>$section</title>\n";
if ($section =~ m/EXAMPLE/i) {
print "<example><para>\n";
print "<informalexample><programlisting>\n";
} else {
print "<para>\n";
}
output_highlight($args{'sections'}{$section});
if ($section =~ m/EXAMPLE/i) {
print "</para></example>\n";
print "</programlisting></informalexample>\n";
} else {
print "</para>\n";
}
print " </para>\n</refsect1>\n";
print "</refsect1>\n";
}
}

Expand Down

0 comments on commit c73894c

Please sign in to comment.