Skip to content
Snippets Groups Projects
Commit 8451c5ff authored by Sean McGivern's avatar Sean McGivern
Browse files

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
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
---
title: Allow trailing whitespace on blockquote fence lines
merge_request:
author:
type: fixed
Loading
Loading
@@ -10,7 +10,7 @@ module Banzai
 
^```
.+?
\n```$
\n```\ *$
)
|
(?<html>
Loading
Loading
@@ -19,9 +19,9 @@ module Banzai
# Anything, including `>>>` blocks which are ignored by this filter
# </tag>
 
^<[^>]+?>\n
^<[^>]+?>\ *\n
.+?
\n<\/[^>]+?>$
\n<\/[^>]+?>\ *$
)
|
(?:
Loading
Loading
@@ -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
)
.
|
Loading
Loading
@@ -48,7 +48,7 @@ module Banzai
\g<html>
)+?
)
\n>>>$
\n>>>\ *$
)
}mx.freeze
 
Loading
Loading
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment