Unified · Split
| @@ -1,6 +0,0 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.GoPage extends app.views.BasePage | ||
| 4 | prepare: -> | ||
| 5 | @highlightCode @findAll('pre'), 'go' | ||
| 6 | return | ||
| @@ -6,6 +6,7 @@ class app.views.SimplePage extends app.views.BasePage · 5 unmodified lines | |||
| 6 | @highlightCode el, el.getAttribute('data-language') | 6 | @highlightCode el, el.getAttribute('data-language') |
| 7 | return | 7 | return |
| 8 | 8 | ||
| 9 | app.views.GoPage = | ||
| 9 | app.views.MeteorPage = | 10 | app.views.MeteorPage = |
| 10 | app.views.RamdaPage = | 11 | app.views.RamdaPage = |
| 11 | app.views.ReactPage = | 12 | app.views.ReactPage = |
| @@ -30,6 +30,7 @@ module Docs · 29 unmodified lines | |||
| 30 | 30 | ||
| 31 | # Remove code highlighting | 31 | # Remove code highlighting |
| 32 | css('pre').each do |node| | 32 | css('pre').each do |node| |
| 33 | node['data-language'] = 'go' | ||
| 33 | node.content = node.content | 34 | node.content = node.content |
| 34 | end | 35 | end |
| 35 | 36 | ||
| @@ -1,7 +1,7 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Go < UrlScraper | 2 | class Go < UrlScraper |
| 3 | self.type = 'go' | 3 | self.type = 'go' |
| 4 | self.release = '1.5.2' | 4 | self.release = '1.6.0' |
| 5 | self.base_url = 'https://golang.org/pkg/' | 5 | self.base_url = 'https://golang.org/pkg/' |
| 6 | self.links = { | 6 | self.links = { |
| 7 | home: 'https://golang.org/', | 7 | home: 'https://golang.org/', |
| @@ -10,6 +10,7 @@ module Docs · 2 unmodified lines | |||
| 10 | 10 | ||
| 11 | html_filters.push 'go/clean_html', 'go/entries' | 11 | html_filters.push 'go/clean_html', 'go/entries' |
| 12 | 12 | ||
| 13 | options[:trailing_slash] = true | ||
| 13 | options[:container] = '#page .container' | 14 | options[:container] = '#page .container' |
| 14 | 15 | ||
| 15 | options[:attribution] = <<-HTML | 16 | options[:attribution] = <<-HTML |