[gtk-doc] mkdb: investigate on mixed content
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: investigate on mixed content
- Date: Fri, 24 Apr 2015 20:36:59 +0000 (UTC)
commit 031b50a021aef658131975c23960723ac0dd6293
Author: Stefan Sauer <ensonic users sf net>
Date: Fri Apr 24 22:36:05 2015 +0200
mkdb: investigate on mixed content
Add logging to the markdown parser. Clarify in a test what is not supported.
gtkdoc-mkdb.in | 5 +++++
tests/gobject/src/gobject.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 1ee6e57..52eddd5 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4772,6 +4772,8 @@ sub MarkDownParseBlocks {
my $first_char = substr ($line, 0, 1);
my $deindented_line;
+ @TRACE@("in '".$md_block->{"type"}."' state, parsing '$line'");
+
if ($md_block->{"type"} eq "markup") {
if (!$md_block->{"closed"}) {
if (index ($line, $md_block->{"start"}) != -1) {
@@ -4781,7 +4783,9 @@ sub MarkDownParseBlocks {
if ($md_block->{"depth"} > 0) {
$md_block->{"depth"}--;
} else {
+ @TRACE@("closing tag '$line'");
$md_block->{"closed"} = 1;
+ # TODO(ensonic): reparse inner text with MarkDownParseLines?
}
}
$md_block->{"text"} .= "\n" . $line;
@@ -4919,6 +4923,7 @@ sub MarkDownParseBlocks {
}
# indentation sensitive types
+ @TRACE@("parsing '$line'");
if ($line =~ /^([#]{1,2})[ \t]+(.+?)[ \t]*[#]*[ \t]*(?:{#([^}]+)})?[ \t]*$/) {
# atx heading (#)
diff --git a/tests/gobject/src/gobject.c b/tests/gobject/src/gobject.c
index cd0d9af..67ccf51 100644
--- a/tests/gobject/src/gobject.c
+++ b/tests/gobject/src/gobject.c
@@ -95,7 +95,7 @@
*
* - A list
*
- * - Inside markup
+ * - that is not recognised as markdown
*
* </refsect3>
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]