summaryrefslogtreecommitdiff
path: root/gtkdoc-mkdb.in
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-10-22 23:03:06 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-10-27 14:06:34 -0400
commit6a1615bf824d701911d067eed0e3241b0cea7fc1 (patch)
treed1cc069ac7d3fc42d63d883396929c4871cd0a7e /gtkdoc-mkdb.in
parent05279903dcc2739cf7812bd2872d1ff04a9c1bd8 (diff)
downloadgtk-doc-6a1615bf824d701911d067eed0e3241b0cea7fc1.tar.gz
Support |[<!-- language="plain" --> ]|
Sometimes, having a simple verbatim element (like <screen> in docbook) comes in handy. Since we don't allow direct xml markup in GTK+'s doc comments anymore, make |[<!-- language="plain --> ... ]| work for this case. https://bugzilla.gnome.org/show_bug.cgi?id=756998
Diffstat (limited to 'gtkdoc-mkdb.in')
-rwxr-xr-xgtkdoc-mkdb.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 4c38aaa..4cc9984 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -5432,15 +5432,22 @@ sub MarkDownOutputDocBook {
$text = &MarkDownParseLines ($block->{"lines"}, $symbol, "quote");
$output .= "<blockquote>\n$text</blockquote>\n";
} elsif ($block->{"type"} eq "code") {
+ my $tag = "programlisting";
+
if ($block->{"language"}) {
- $output .= "<informalexample><programlisting language=\"" . $block->{"language"} . "\"><![CDATA[\n";
+ if ($block->{"language"} eq "plain") {
+ $output .= "<informalexample><screen><![CDATA[\n";
+ $tag = "screen";
+ } else {
+ $output .= "<informalexample><programlisting language=\"" . $block->{"language"} . "\"><![CDATA[\n";
+ }
} else {
$output .= "<informalexample><programlisting><![CDATA[\n";
}
foreach (@{$block->{"lines"}}) {
$output .= &ReplaceEntities ($_, $symbol) . "\n";
}
- $output .= "]]></programlisting></informalexample>\n";
+ $output .= "]]></$tag></informalexample>\n";
} elsif ($block->{"type"} eq "markup") {
$text = &ExpandAbbreviations($symbol, $block->{"text"});
$output .= $text."\n";