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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f8e1fb75
Commit
f8e1fb75
authored
Jun 07, 2021
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escaped markdown not interpreted as shortcuts
Changelog: added
parent
a9a7f192
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
24 deletions
+0
-24
config/feature_flags/development/honor_escaped_markdown.yml
config/feature_flags/development/honor_escaped_markdown.yml
+0
-8
lib/banzai/filter/markdown_pre_escape_filter.rb
lib/banzai/filter/markdown_pre_escape_filter.rb
+0
-2
spec/lib/banzai/pipeline/plain_markdown_pipeline_spec.rb
spec/lib/banzai/pipeline/plain_markdown_pipeline_spec.rb
+0
-14
No files found.
config/feature_flags/development/honor_escaped_markdown.yml
deleted
100644 → 0
View file @
a9a7f192
---
name
:
honor_escaped_markdown
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45922
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/300531
milestone
:
'
13.9'
type
:
development
group
:
'
group::project
management'
default_enabled
:
false
lib/banzai/filter/markdown_pre_escape_filter.rb
View file @
f8e1fb75
...
...
@@ -30,8 +30,6 @@ module Banzai
LITERAL_KEYWORD
=
'cmliteral'
def
call
return
@text
unless
Feature
.
enabled?
(
:honor_escaped_markdown
,
context
[
:group
]
||
context
[
:project
]
&
.
group
)
@text
.
gsub
(
ASCII_PUNCTUATION
)
do
|
match
|
# The majority of markdown does not have literals. If none
# are found, we can bypass the post filter
...
...
spec/lib/banzai/pipeline/plain_markdown_pipeline_spec.rb
View file @
f8e1fb75
...
...
@@ -17,20 +17,6 @@ RSpec.describe Banzai::Pipeline::PlainMarkdownPipeline do
result
end
context
'when feature flag honor_escaped_markdown is disabled'
do
before
do
stub_feature_flags
(
honor_escaped_markdown:
false
)
end
it
'does not escape the markdown'
do
result
=
described_class
.
call
(
%q(\!)
,
project:
project
)
output
=
result
[
:output
].
to_html
expect
(
output
).
to
eq
(
'<p data-sourcepos="1:1-1:2">!</p>'
)
expect
(
result
[
:escaped_literals
]).
to
be_falsey
end
end
describe
'CommonMark tests'
,
:aggregate_failures
do
it
'converts all reference punctuation to literals'
do
reference_chars
=
Banzai
::
Filter
::
MarkdownPreEscapeFilter
::
REFERENCE_CHARACTERS
...
...
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