]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1154457 - Extra lines for nested MarkDown lists
authorAlbert Ting <altlist@gmail.com>
Wed, 13 Apr 2016 21:09:38 +0000 (21:09 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Wed, 13 Apr 2016 21:09:38 +0000 (21:09 +0000)
r=dkl

Bugzilla/Markdown.pm

index 49f49c9b0f046a56e262881aeda3ef93b49d1109..a82e9f3e00b72aa4245fa9fb80b1d64d3084ae00 100644 (file)
@@ -478,6 +478,17 @@ sub _DoBlockQuotes {
     return $text;
 }
 
+sub _DoLists {
+    my ($self, $text) = @_;
+
+    $text = $self->SUPER::_DoLists($text);
+
+    # strip trailing newlines created by DoLists
+    $text =~ s/\n</</g;
+
+    return $text;
+}
+
 sub _EncodeCode {
     my ($self, $text) = @_;