[gtk-doc] Correctly handle neighboring ordered and unordered lists



commit 9c464e7ccd019f24aece58e652d99659364bf1fd
Author: William Jon McCann <william jon mccann gmail com>
Date:   Sat Feb 8 22:34:20 2014 -0500

    Correctly handle neighboring ordered and unordered lists

 gtkdoc-mkdb.in              |    6 +++++-
 tests/gobject/src/gobject.c |    4 ++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 89ec976..428270b 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -4750,7 +4750,8 @@ sub MarkDownParseBlocks {
         next OUTER;
       }
     } elsif ($md_block->{"type"} eq "li") {
-      if ($line =~ /^([ ]{0,3})(\d+[.]|[*+-])[ ](.*)/) {
+      my $marker = $md_block->{"marker"};
+      if ($line =~ /^([ ]{0,3})($marker)[ ](.*)/) {
         my $indentation = $1;
         if ($md_block->{"indentation"} ne $indentation) {
           push $md_block->{"lines"}, $line;
@@ -4763,6 +4764,7 @@ sub MarkDownParseBlocks {
           $md_block = { type => "li",
                         ordered => $ordered,
                         indentation => $indentation,
+                        marker => $marker,
                         first => 0,
                         last => 1,
                         lines => [ $lines ] };
@@ -4877,6 +4879,7 @@ sub MarkDownParseBlocks {
       $md_block = { type => "li",
                     ordered => 0,
                     indentation => $indentation,
+                    marker => "[*+-]",
                     first => 1,
                     last => 1,
                     lines => [ $lines ] };
@@ -4899,6 +4902,7 @@ sub MarkDownParseBlocks {
       $md_block = { type => "li",
                     ordered => 1,
                     indentation => $indentation,
+                    marker => "\\d+[.]",
                     first => 1,
                     last => 1,
                     lines => [ $lines ] };
diff --git a/tests/gobject/src/gobject.c b/tests/gobject/src/gobject.c
index 7229ee9..a297d54 100644
--- a/tests/gobject/src/gobject.c
+++ b/tests/gobject/src/gobject.c
@@ -101,6 +101,10 @@
  *
  * # Coda # {#this-is-an-id-tag}
  *
+ * - One
+ * - Two
+ * - Three
+ *
  * 1. This is a ordered list
  *
  * 1. This is a code block in a list:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]