mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
569 B
24 lines
569 B
#= require views/pages/base
|
|
|
|
class app.views.JavascriptPage extends app.views.BasePage
|
|
prepare: ->
|
|
@highlightCode @findAllByTag('pre'), 'javascript'
|
|
return
|
|
|
|
class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
|
|
prepare: ->
|
|
for el in @findAllByTag('pre')
|
|
language = if el.textContent.match(/^\s*</)
|
|
'markup'
|
|
else
|
|
'javascript'
|
|
@highlightCode el, language
|
|
return
|
|
|
|
app.views.GruntPage =
|
|
app.views.JavascriptPage
|
|
|
|
app.views.DojoPage =
|
|
app.views.RequirejsPage =
|
|
app.views.JavascriptWithMarkupCheckPage
|