[gtk-doc] mkdb: interpolate params in output text
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: interpolate params in output text
- Date: Tue, 12 May 2015 11:46:16 +0000 (UTC)
commit 110fc072016b274ac6ef38709bf9a7b2d884bf3e
Author: Stefan Sauer <ensonic users sf net>
Date: Tue May 12 13:40:22 2015 +0200
mkdb: interpolate params in output text
make the code a bit easier to read.
gtkdoc-mkdb.in | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 6e11e56..bf7ef7c 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -5368,19 +5368,21 @@ sub MarkDownOutputDocBook {
my $text;
my $title;
+ #$output .= "\n<!-- beg type='" . $block->{"type"} . "'-->\n";
+
if ($block->{"type"} eq "paragraph") {
$text = &MarkDownParseSpanElements ($block->{"text"});
if ($context eq "li" && $output eq "") {
if ($block->{"interrupted"}) {
- $output .= "\n"."<para>".$text."</para>"."\n";
+ $output .= "\n<para>$text</para>\n";
} else {
- $output .= "<para>".$text."</para>";
+ $output .= "<para>$text</para>";
if ($#blocks > 0) {
$output .= "\n";
}
}
} else {
- $output .= "<para>".$text."</para>"."\n";
+ $output .= "<para>$text</para>\n";
}
} elsif ($block->{"type"} eq "heading") {
@@ -5396,12 +5398,12 @@ sub MarkDownOutputDocBook {
$text = &MarkDownParseLines ($block->{"lines"}, $symbol, "heading");
if (defined ($block->{"id"})) {
- $output .= "<" . $tag . " id=\"" . $block->{"id"} . "\">";
+ $output .= "<$tag id=\"" . $block->{"id"} . "\">";
} else {
- $output .= "<" . $tag . ">";
+ $output .= "<$tag>";
}
- $output .= "<title>" . $title . "</title>" . $text . "</" . $tag . ">\n";
+ $output .= "<title>$title</title>$text</$tag>\n";
} elsif ($block->{"type"} eq "li") {
my $tag = "itemizedlist";
@@ -5409,7 +5411,7 @@ sub MarkDownOutputDocBook {
if ($block->{"ordered"}) {
$tag = "orderedlist";
}
- $output .= "<".$tag.">\n";
+ $output .= "<$tag>\n";
}
if ($block->{"interrupted"}) {
@@ -5422,11 +5424,11 @@ sub MarkDownOutputDocBook {
if ($block->{"ordered"}) {
$tag = "orderedlist";
}
- $output .= "</".$tag.">\n";
+ $output .= "</$tag>\n";
}
} elsif ($block->{"type"} eq "quote") {
$text = &MarkDownParseLines ($block->{"lines"}, $symbol, "quote");
- $output .= "<blockquote>\n" . $text . "</blockquote>\n";
+ $output .= "<blockquote>\n$text</blockquote>\n";
} elsif ($block->{"type"} eq "code") {
if ($block->{"language"}) {
$output .= "<informalexample><programlisting language=\"" . $block->{"language"} . "\"><![CDATA[\n";
@@ -5443,6 +5445,7 @@ sub MarkDownOutputDocBook {
} else {
$output .= $block->{"text"}."\n";
}
+ #$output .= "\n<!-- end type='" . $block->{"type"} . "'-->\n";
}
return $output;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]