Improve Node.js scraper

pull/165/head
Thibaut 10 years ago
parent 88c7f108ea
commit 0fc2aacb83

@ -23,6 +23,7 @@ app.views.MarionettePage =
app.views.ModernizrPage =
app.views.MomentPage =
app.views.MongoosePage =
app.views.NodePage =
app.views.RethinkdbPage =
app.views.SinonPage =
app.views.UnderscorePage =

@ -1,6 +0,0 @@
#= require views/pages/base
class app.views.NodePage extends app.views.BasePage
afterRender: ->
@highlightCode @findAll('pre > code'), 'javascript'
return

@ -5,12 +5,8 @@
.api_stability_5 { @extend %note, %note-blue; }
> h2 { @extend %block-heading; }
> h3 {
margin: 2rem 0 1rem;
font-size: 1rem;
}
> h3 { @extend %block-label, %label-blue; }
> h4 { @extend %block-label; }
> h2 + h2, > h3 + h3 { margin-top: 0; }
> p > code, .type {
@ -18,3 +14,4 @@
@extend %label;
}
}

@ -8,6 +8,14 @@ module Docs
node.parent.remove
end
css('pre[class*="api_stability"]').each do |node|
node.name = 'div'
end
css('pre').each do |node|
node.content = node.content
end
doc
end
end

Loading…
Cancel
Save