Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
b762fc4b
Commit
b762fc4b
authored
Jun 18, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow trailing whitespace on blockquote fence lines
parent
99fdbe4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
changelogs/unreleased/dm-blockquote-trailing-whitespace.yml
changelogs/unreleased/dm-blockquote-trailing-whitespace.yml
+5
-0
lib/banzai/filter/blockquote_fence_filter.rb
lib/banzai/filter/blockquote_fence_filter.rb
+6
-6
spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
+4
-0
No files found.
changelogs/unreleased/dm-blockquote-trailing-whitespace.yml
0 → 100644
View file @
b762fc4b
---
title
:
Allow trailing whitespace on blockquote fence lines
merge_request
:
author
:
type
:
fixed
lib/banzai/filter/blockquote_fence_filter.rb
View file @
b762fc4b
...
@@ -10,7 +10,7 @@ module Banzai
...
@@ -10,7 +10,7 @@ module Banzai
^```
^```
.+?
.+?
\n
```$
\n
```
\
*
$
)
)
|
|
(?<html>
(?<html>
...
@@ -19,9 +19,9 @@ module Banzai
...
@@ -19,9 +19,9 @@ module Banzai
# Anything, including `>>>` blocks which are ignored by this filter
# Anything, including `>>>` blocks which are ignored by this filter
# </tag>
# </tag>
^<[^>]+?>
\n
^<[^>]+?>
\
*
\
n
.+?
.+?
\n
<
\/
[^>]+?>$
\n
<
\/
[^>]+?>
\
*
$
)
)
|
|
(?:
(?:
...
@@ -30,14 +30,14 @@ module Banzai
...
@@ -30,14 +30,14 @@ module Banzai
# Anything, including code and HTML blocks
# Anything, including code and HTML blocks
# >>>
# >>>
^>>>
\n
^>>>
\
*
\
n
(?<quote>
(?<quote>
(?:
(?:
# Any character that doesn't introduce a code or HTML block
# Any character that doesn't introduce a code or HTML block
(?!
(?!
^```
^```
|
|
^<[^>]+?>
\n
^<[^>]+?>
\
*
\
n
)
)
.
.
|
|
...
@@ -48,7 +48,7 @@ module Banzai
...
@@ -48,7 +48,7 @@ module Banzai
\g
<html>
\g
<html>
)+?
)+?
)
)
\n
>>>$
\n
>>>
\
*
$
)
)
}mx
.
freeze
}mx
.
freeze
...
...
spec/lib/banzai/filter/blockquote_fence_filter_spec.rb
View file @
b762fc4b
...
@@ -11,4 +11,8 @@ describe Banzai::Filter::BlockquoteFenceFilter do
...
@@ -11,4 +11,8 @@ describe Banzai::Filter::BlockquoteFenceFilter do
expect
(
output
).
to
eq
(
expected
)
expect
(
output
).
to
eq
(
expected
)
end
end
it
'allows trailing whitespace on blockquote fence lines'
do
expect
(
filter
(
">>>
\n
test
\n
>>> "
)).
to
eq
(
"> test"
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment