GNOME Bugzilla – Bug 723288
Fix MarkDown support
Last modified: 2014-02-01 12:13:31 UTC
There are a number of issues with markdown support. Here are some patches to improve the situation.
Created attachment 267633 [details] [review] tests: Add a test for multiple sections per comment block
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.
Created attachment 267635 [details] [review] Add some newlines to space out the output a bit
Created attachment 267636 [details] [review] tests: add test for section heading without trailing hash
Created attachment 267637 [details] [review] Support leaving off the trailing hashes in headings Fixes test added in previous commit.
Created attachment 267638 [details] [review] tests: add test case for second level heading
Created attachment 267639 [details] [review] Don't identify ## level headings as first level
Created attachment 267640 [details] [review] Use a slightly more robust way of keeping track of markdown tags
Created attachment 267641 [details] [review] Support refsect3 markdown
Created attachment 267642 [details] [review] tests: add a test case for not change existing lists
Created attachment 267643 [details] [review] Make the parsing of lists a bit more robust
Created attachment 267644 [details] [review] Add more markdown-style list support (*)
Created attachment 267645 [details] [review] Support lists with blocks inside them
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/
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
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
Cool stuff, please push (after applying the suggestions).
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