[gtk-doc] mkdb: fix xml when using refsect2 in docblobs, Fixes #611848
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: fix xml when using refsect2 in docblobs, Fixes #611848
- Date: Fri, 5 Mar 2010 10:12:23 +0000 (UTC)
commit 366f2b6823bd8e4d4748fd5fed6d822d53d38f83
Author: Stefan Kost <ensonic users sf net>
Date: Fri Mar 5 12:11:17 2010 +0200
mkdb: fix xml when using refsect2 in docblobs, Fixes #611848
Strip para tag wrapping the refsect2. Add example to tests.
gtkdoc-mkdb.in | 11 +++++++----
tests/bugs/src/tester.c | 6 ++++++
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 58647a8..0873246 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4325,12 +4325,15 @@ sub MergeSourceDocumentation {
# a </para> followed by <!--PARAMETERS--> followed by <para>.
$src_doc =~ s%\n+\s*<!--PARAMETERS-->\s*\n+%\n</para>\n<!--PARAMETERS-->\n<para>\n%g;
- # If there is a blank line, finish the paragraph and start another.
- $src_doc = &ConvertBlankLines ($src_doc, $symbol);
# Do not add <para> to nothing, it breaks missing docs checks.
my $src_doc_para = "";
- if ($src_doc) {
- $src_doc_para = "<para>\n$src_doc</para>\n";
+ if ($src_doc ne "") {
+ # If there is a blank line, finish the paragraph and start another.
+ $src_doc = &ConvertBlankLines ($src_doc, $symbol);
+ $src_doc_para = "<para>\n$src_doc\n</para>";
+ # fixup xml markup
+ $src_doc_para =~ s%<para>\n<refsect2%<refsect2%gms;
+ $src_doc_para =~ s%</refsect2>\n</para>%</refsect2>%gms;
#print "$symbol : [$src_doc][$src_doc_para]\n";
}
diff --git a/tests/bugs/src/tester.c b/tests/bugs/src/tester.c
index 89dd985..6a9e768 100644
--- a/tests/bugs/src/tester.c
+++ b/tests/bugs/src/tester.c
@@ -6,6 +6,12 @@
*
* As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
* returns nothing.
+ *
+ * <refsect2 id="dummy-id">
+ * <para>
+ * Second paragraph inside subsection.
+ * </para>
+ * </refsect2>
*/
#include <glib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]