History

Improve Grunt scraper

Thibaut Courouble committed 9 years ago

Commit 9d53de61 parent 05f2a664 files · +3 −9Browse files

Unified · Split

4 files
  1. assets/javascripts/views/pages/javascript.coffee +0 −8
  2. assets/javascripts/views/pages/simple.coffee +1 −0
  3. lib/docs/filters/grunt/clean_html.rb +1 −0
  4. lib/docs/scrapers/grunt.rb +1 −1
assets/javascripts/views/pages/javascript.coffee+0−8
@@ -1,10 +1,5 @@
11 #= require views/pages/base
22
3−class app.views.JavascriptPage extends app.views.BasePage
4− prepare: ->
5− @highlightCode @findAllByTag('pre'), 'javascript'
6− return
7−
83 class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage
94 prepare: ->
105 for el in @findAllByTag('pre')
@@ -15,9 +10,6 @@ class app.views.JavascriptWithMarkupCheckPage extends app.views.BasePage · 4 unmodified lines
1510 @highlightCode el, language
1611 return
1712
18−app.views.GruntPage =
19−app.views.JavascriptPage
20−
2113 app.views.DojoPage =
2214 app.views.RequirejsPage =
2315 app.views.JavascriptWithMarkupCheckPage
assets/javascripts/views/pages/simple.coffee+1−0
@@ -30,6 +30,7 @@ app.views.ExpressPage = · 29 unmodified lines
3030 app.views.FlowPage =
3131 app.views.GithubPage =
3232 app.views.GoPage =
33+app.views.GruntPage =
3334 app.views.ImmutablePage =
3435 app.views.InfluxdataPage =
3536 app.views.JasminePage =
lib/docs/filters/grunt/clean_html.rb+1−0
@@ -19,6 +19,7 @@ module Docs · 18 unmodified lines
1919 # Remove code highlighting
2020 css('pre').each do |node|
2121 node.content = node.content
22+ node['data-language'] = 'javascript'
2223 end
2324
2425 doc
lib/docs/scrapers/grunt.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 self.name = 'Grunt'
44 self.type = 'grunt'
55 self.release = '1.0.1'
6− self.base_url = 'http://gruntjs.com/'
6+ self.base_url = 'https://gruntjs.com/'
77 self.root_path = 'getting-started'
88 self.initial_paths = %w(api/grunt)
99