Commit cc22a264 authored by Robert Speicher's avatar Robert Speicher

Add syntax highlight scheme to notes rendered client-side

parent 50f76ae0
......@@ -123,6 +123,7 @@ class @Notes
if @isNewNote(note)
@note_ids.push(note.id)
$('ul.main-notes-list').append(note.html)
$('.js-syntax-highlight').syntaxHighlight()
@initTaskList()
###
......
......@@ -5,5 +5,8 @@
#
# <div class="js-syntax-highlight"></div>
#
$.fn.syntaxHighlight = ->
$(this).addClass(gon.user_color_scheme)
$(document).on 'ready page:load', ->
$('.js-syntax-highlight').addClass(gon.user_color_scheme)
$('.js-syntax-highlight').syntaxHighlight()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment