After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723288 - Fix MarkDown support
Fix MarkDown support
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: 1.20
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-30 14:35 UTC by William Jon McCann
Modified: 2014-02-01 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Add a test for multiple sections per comment block (713 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Don't eat newlines in section heading regex (1.27 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Add some newlines to space out the output a bit (1.81 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
tests: add test for section heading without trailing hash (747 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Support leaving off the trailing hashes in headings (899 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
tests: add test case for second level heading (847 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Don't identify ## level headings as first level (858 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Use a slightly more robust way of keeping track of markdown tags (4.22 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Support refsect3 markdown (2.26 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
tests: add a test case for not change existing lists (896 bytes, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Make the parsing of lists a bit more robust (2.21 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Add more markdown-style list support (*) (3.28 KB, patch)
2014-01-30 14:35 UTC, William Jon McCann
committed Details | Review
Support lists with blocks inside them (2.61 KB, patch)
2014-01-30 14:36 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2014-01-30 14:35:16 UTC
There are a number of issues with markdown support. Here are
some patches to improve the situation.
Comment 1 William Jon McCann 2014-01-30 14:35:18 UTC
Created attachment 267633 [details] [review]
tests: Add a test for multiple sections per comment block
Comment 2 William Jon McCann 2014-01-30 14:35:28 UTC
Created attachment 267634 [details] [review]
Don't eat newlines in section heading regex

Use a lookbehind operator to match the newlines without stealing them.
Fixes test in previous commit.
Comment 3 William Jon McCann 2014-01-30 14:35:31 UTC
Created attachment 267635 [details] [review]
Add some newlines to space out the output a bit
Comment 4 William Jon McCann 2014-01-30 14:35:34 UTC
Created attachment 267636 [details] [review]
tests: add test for section heading without trailing hash
Comment 5 William Jon McCann 2014-01-30 14:35:37 UTC
Created attachment 267637 [details] [review]
Support leaving off the trailing hashes in headings

Fixes test added in previous commit.
Comment 6 William Jon McCann 2014-01-30 14:35:40 UTC
Created attachment 267638 [details] [review]
tests: add test case for second level heading
Comment 7 William Jon McCann 2014-01-30 14:35:43 UTC
Created attachment 267639 [details] [review]
Don't identify ## level headings as first level
Comment 8 William Jon McCann 2014-01-30 14:35:46 UTC
Created attachment 267640 [details] [review]
Use a slightly more robust way of keeping track of markdown tags
Comment 9 William Jon McCann 2014-01-30 14:35:49 UTC
Created attachment 267641 [details] [review]
Support refsect3 markdown
Comment 10 William Jon McCann 2014-01-30 14:35:52 UTC
Created attachment 267642 [details] [review]
tests: add a test case for not change existing lists
Comment 11 William Jon McCann 2014-01-30 14:35:55 UTC
Created attachment 267643 [details] [review]
Make the parsing of lists a bit more robust
Comment 12 William Jon McCann 2014-01-30 14:35:59 UTC
Created attachment 267644 [details] [review]
Add more markdown-style list support (*)
Comment 13 William Jon McCann 2014-01-30 14:36:03 UTC
Created attachment 267645 [details] [review]
Support lists with blocks inside them
Comment 14 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-30 20:19:49 UTC
Review of attachment 267636 [details] [review]:

::: tests/gobject/src/gobject.c
@@ +39,3 @@
+ * # Discussion
+ *
+ * This is a section with a heading witout a trailing hash mark.

typo: s/witout/without/
Comment 15 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-30 20:58:23 UTC
Review of attachment 267643 [details] [review]:

::: gtkdoc-mkdb.in
@@ +4723,3 @@
     #   New paragraph.
     $text.="\n"; # we need a new line to avoid too complicated matching rules below
+    my $is_last = 0;

our $is_last = 0;
http://perldoc.perl.org/functions/our.html
Comment 16 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-30 21:02:48 UTC
Review of attachment 267640 [details] [review]:

::: gtkdoc-mkdb.in
@@ +4572,3 @@
+my %md_in_tags;
+
+# If they tag is open, close it and update counter

typo: s/they/the
Comment 17 Stefan Sauer (gstreamer, gtkdoc dev) 2014-01-30 21:03:44 UTC
Cool stuff, please push (after applying the suggestions).
Comment 18 William Jon McCann 2014-01-30 21:29:33 UTC
Attachment 267633 [details] pushed as cca8748 - tests: Add a test for multiple sections per comment block
Attachment 267634 [details] pushed as c7b48fb - Don't eat newlines in section heading regex
Attachment 267635 [details] pushed as a589182 - Add some newlines to space out the output a bit
Attachment 267636 [details] pushed as 9320a2c - tests: add test for section heading without trailing hash
Attachment 267637 [details] pushed as aab96bc - Support leaving off the trailing hashes in headings
Attachment 267638 [details] pushed as 5729fa7 - tests: add test case for second level heading
Attachment 267639 [details] pushed as f1c8cae - Don't identify ## level headings as first level
Attachment 267640 [details] pushed as 933177c - Use a slightly more robust way of keeping track of markdown tags
Attachment 267641 [details] pushed as 8be6ad7 - Support refsect3 markdown
Attachment 267642 [details] pushed as ff2945e - tests: add a test case for not change existing lists
Attachment 267643 [details] pushed as 24123c1 - Make the parsing of lists a bit more robust
Attachment 267644 [details] pushed as e35613d - Add more markdown-style list support (*)
Attachment 267645 [details] pushed as c120faa - Support lists with blocks inside them