Commit b762fc4b authored by Douwe Maan's avatar Douwe Maan

Allow trailing whitespace on blockquote fence lines

parent 99fdbe4c
---
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