mirror of https://github.com/freeCodeCamp/devdocs
parent
ac3aaea531
commit
c5caeff917
@ -1,6 +1,9 @@
|
||||
#= require views/pages/base
|
||||
|
||||
class app.views.GithubPage extends app.views.BasePage
|
||||
LANGUAGE_RGX = /highlight-source-(\w+)/
|
||||
|
||||
prepare: ->
|
||||
@highlightCode @findAll('pre.highlight-source-lua'), 'lua'
|
||||
for el in @findAll('pre.highlight')
|
||||
@highlightCode(el, el.className.match(LANGUAGE_RGX)[1])
|
||||
return
|
||||
|
@ -0,0 +1,5 @@
|
||||
._github {
|
||||
@extend %simple;
|
||||
|
||||
h4 { @extend %block-label; }
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
._q {
|
||||
> h2, > h3 { @extend %block-heading; }
|
||||
> h4 { @extend %block-label, %label-blue; }
|
||||
code { @extend %label; }
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
module Docs
|
||||
class Q
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
css('.anchor').each do |node|
|
||||
node.parent['id'] = node['href'].remove('#')
|
||||
node.remove
|
||||
end
|
||||
|
||||
css('.highlight > pre').each do |node|
|
||||
node.content = node.content.gsub(' ', ' ')
|
||||
end
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue