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
c3b0e5c0
Commit
c3b0e5c0
authored
Mar 17, 2021
by
GitLab Release Tools Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'dev/master'
parents
f49ec613
60530366
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
0 deletions
+96
-0
CHANGELOG-EE.md
CHANGELOG-EE.md
+12
-0
CHANGELOG.md
CHANGELOG.md
+21
-0
config/initializers/kramdown_patch.rb
config/initializers/kramdown_patch.rb
+25
-0
spec/initializers/kramdown_patch_spec.rb
spec/initializers/kramdown_patch_spec.rb
+38
-0
No files found.
CHANGELOG-EE.md
View file @
c3b0e5c0
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
## 13.9.4 (2021-03-17)
-
No changes.
## 13.9.3 (2021-03-08)
## 13.9.3 (2021-03-08)
-
No changes.
-
No changes.
...
@@ -166,6 +170,10 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -166,6 +170,10 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Review UI text - repo push rules settings. !52797
-
Review UI text - repo push rules settings. !52797
## 13.8.6 (2021-03-17)
-
No changes.
## 13.8.5 (2021-03-04)
## 13.8.5 (2021-03-04)
-
No changes.
-
No changes.
...
@@ -312,6 +320,10 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -312,6 +320,10 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Enable DevOps Adoption Report feature flag if any Segments already exist. !51602
-
Enable DevOps Adoption Report feature flag if any Segments already exist. !51602
## 13.7.9 (2021-03-17)
-
No changes.
## 13.7.8 (2021-03-04)
## 13.7.8 (2021-03-04)
-
No changes.
-
No changes.
...
...
CHANGELOG.md
View file @
c3b0e5c0
...
@@ -2,6 +2,13 @@
...
@@ -2,6 +2,13 @@
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
entry.
entry.
## 13.9.4 (2021-03-17)
### Security (1 change)
-
Patch Kramdown syntax highlighter gem.
## 13.9.3 (2021-03-08)
## 13.9.3 (2021-03-08)
### Fixed (4 changes)
### Fixed (4 changes)
...
@@ -610,6 +617,13 @@ entry.
...
@@ -610,6 +617,13 @@ entry.
-
Apply new GitLab UI for buttons in pipeline schedules.
-
Apply new GitLab UI for buttons in pipeline schedules.
## 13.8.6 (2021-03-17)
### Security (1 change)
-
Patch Kramdown syntax highlighter gem.
## 13.8.5 (2021-03-04)
## 13.8.5 (2021-03-04)
### Security (6 changes)
### Security (6 changes)
...
@@ -1022,6 +1036,13 @@ entry.
...
@@ -1022,6 +1036,13 @@ entry.
-
Add verbiage + link sast to show it's in core. !51935
-
Add verbiage + link sast to show it's in core. !51935
## 13.7.9 (2021-03-17)
### Security (1 change)
-
Patch Kramdown syntax highlighter gem.
## 13.7.8 (2021-03-04)
## 13.7.8 (2021-03-04)
### Security (5 changes)
### Security (5 changes)
...
...
config/initializers/kramdown_patch.rb
0 → 100644
View file @
c3b0e5c0
# frozen_string_literal: true
#
# This pulls in https://github.com/gettalong/kramdown/pull/708 for kramdown v2.3.0.
# Remove this file when that pull request is merged and released.
require
'kramdown/converter'
require
'kramdown/converter/syntax_highlighter/rouge'
module
Kramdown::Converter::SyntaxHighlighter
module
Rouge
def
self
.
formatter_class
(
opts
=
{})
case
formatter
=
opts
[
:formatter
]
when
Class
formatter
when
/\A[[:upper:]][[:alnum:]_]*\z/
::
Rouge
::
Formatters
.
const_get
(
formatter
,
false
)
else
# Available in Rouge 2.0 or later
::
Rouge
::
Formatters
::
HTMLLegacy
end
rescue
NameError
# Fallback to Rouge 1.x
::
Rouge
::
Formatters
::
HTML
end
end
end
spec/initializers/kramdown_patch_spec.rb
0 → 100644
View file @
c3b0e5c0
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'Kramdown patch for syntax highlighting formatters'
do
subject
{
Kramdown
::
Document
.
new
(
options
+
"
\n
"
+
code
).
to_html
}
let
(
:code
)
do
<<-
RUBY
~~~ ruby
def what?
42
end
~~~
RUBY
end
context
'with invalid formatter'
do
let
(
:options
)
{
%({::options auto_ids="false" footnote_nr="5" syntax_highlighter="rouge" syntax_highlighter_opts="{formatter: CSV, line_numbers: true
\\
}" /})
}
it
'falls back to standard HTML and disallows CSV'
do
expect
(
CSV
).
not_to
receive
(
:new
)
expect
(
::
Rouge
::
Formatters
::
HTML
).
to
receive
(
:new
).
and_call_original
expect
(
subject
).
to
be_present
end
end
context
'with valid formatter'
do
let
(
:options
)
{
%({::options auto_ids="false" footnote_nr="5" syntax_highlighter="rouge" syntax_highlighter_opts="{formatter: HTMLLegacy
\\
}" /})
}
it
'allows formatter'
do
expect
(
::
Rouge
::
Formatters
::
HTMLLegacy
).
to
receive
(
:new
).
and_call_original
expect
(
subject
).
to
be_present
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