Commit 8451c5ff authored by Sean McGivern's avatar Sean McGivern

Merge branch 'dm-blockquote-trailing-whitespace' into 'master'

Allow trailing whitespace on blockquote fence lines

See merge request gitlab-org/gitlab-ce!19960
parents 3c725a2a b762fc4b
---
title: Allow trailing whitespace on blockquote fence lines
merge_request:
author:
type: fixed
......@@ -10,7 +10,7 @@ module Banzai
^```
.+?
\n```$
\n```\ *$
)
|
(?<html>
......@@ -19,9 +19,9 @@ module Banzai
# Anything, including `>>>` blocks which are ignored by this filter
# </tag>
^<[^>]+?>\n
^<[^>]+?>\ *\n
.+?
\n<\/[^>]+?>$
\n<\/[^>]+?>\ *$
)
|
(?:
......@@ -30,14 +30,14 @@ module Banzai
# Anything, including code and HTML blocks
# >>>
^>>>\n
^>>>\ *\n
(?<quote>
(?:
# Any character that doesn't introduce a code or HTML block
(?!
^```
|
^<[^>]+?>\n
^<[^>]+?>\ *\n
)
.
|
......@@ -48,7 +48,7 @@ module Banzai
\g<html>
)+?
)
\n>>>$
\n>>>\ *$
)
}mx.freeze
......
......@@ -11,4 +11,8 @@ describe Banzai::Filter::BlockquoteFenceFilter do
expect(output).to eq(expected)
end
it 'allows trailing whitespace on blockquote fence lines' do
expect(filter(">>> \ntest\n>>> ")).to eq("> test")
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment