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
Jérome Perrin
gitlab-ce
Commits
96274c27
Commit
96274c27
authored
Jun 15, 2016
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the wrapping back in for the banzai filter
parent
2ae837f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/banzai/filter/syntax_highlight_filter.rb
lib/banzai/filter/syntax_highlight_filter.rb
+5
-1
No files found.
lib/banzai/filter/syntax_highlight_filter.rb
View file @
96274c27
...
...
@@ -20,7 +20,7 @@ module Banzai
code
=
node
.
text
begin
highlighted
=
block_code
(
code
,
language
)
highlighted
=
%<<pre class="#{css_classes}"><code>#{block_code(code, language)}</code></pre>>
rescue
# Gracefully handle syntax highlighter bugs/errors to ensure
# users can still access an issue/comment/etc.
...
...
@@ -31,6 +31,10 @@ module Banzai
replace_parent_pre_element
(
node
,
highlighted
)
end
def
css_classes
"code highlight js-syntax-highlight
#{
lexer
.
tag
}
"
end
private
def
replace_parent_pre_element
(
node
,
highlighted
)
...
...
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