Simplify rdoc code highlighting

This commit is contained in:
Thibaut Courouble 2017-07-23 10:42:50 -04:00
parent 167f538647
commit bffabec8a6

View file

@ -1,14 +1,9 @@
#= require views/pages/base
#= require views/pages/simple
class app.views.RdocPage extends app.views.BasePage
class app.views.RdocPage extends app.views.SimplePage
@events:
click: 'onClick'
prepare: ->
@highlightCode @findAll('pre.ruby'), 'ruby'
@highlightCode @findAll('pre.c'), 'clike'
return
onClick: (event) ->
return unless event.target.classList.contains 'method-click-advice'
$.stopEvent(event)