mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Simplify rdoc code highlighting
This commit is contained in:
parent
167f538647
commit
bffabec8a6
1 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue