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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
cc22a264
Commit
cc22a264
authored
Sep 04, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add syntax highlight scheme to notes rendered client-side
parent
50f76ae0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+1
-0
app/assets/javascripts/syntax_highlight.coffee
app/assets/javascripts/syntax_highlight.coffee
+4
-1
No files found.
app/assets/javascripts/notes.js.coffee
View file @
cc22a264
...
@@ -123,6 +123,7 @@ class @Notes
...
@@ -123,6 +123,7 @@ class @Notes
if
@
isNewNote
(
note
)
if
@
isNewNote
(
note
)
@
note_ids
.
push
(
note
.
id
)
@
note_ids
.
push
(
note
.
id
)
$
(
'ul.main-notes-list'
).
append
(
note
.
html
)
$
(
'ul.main-notes-list'
).
append
(
note
.
html
)
$
(
'.js-syntax-highlight'
).
syntaxHighlight
()
@
initTaskList
()
@
initTaskList
()
###
###
...
...
app/assets/javascripts/syntax_highlight.coffee
View file @
cc22a264
...
@@ -5,5 +5,8 @@
...
@@ -5,5 +5,8 @@
#
#
# <div class="js-syntax-highlight"></div>
# <div class="js-syntax-highlight"></div>
#
#
$
.
fn
.
syntaxHighlight
=
->
$
(
this
).
addClass
(
gon
.
user_color_scheme
)
$
(
document
).
on
'ready page:load'
,
->
$
(
document
).
on
'ready page:load'
,
->
$
(
'.js-syntax-highlight'
).
addClass
(
gon
.
user_color_scheme
)
$
(
'.js-syntax-highlight'
).
syntaxHighlight
(
)
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