Update Knockout.js documentation (3.4.1)

pull/546/head
Thibaut Courouble 8 years ago
parent 52549891de
commit 38b5513b97

@ -1,8 +0,0 @@
#= require views/pages/base
class app.views.KnockoutPage extends app.views.BasePage
prepare: ->
for el in @findAll('pre')
language = if el.innerHTML.indexOf('data-bind="') > 0 then 'markup' else 'javascript'
@highlightCode el, language
return

@ -23,6 +23,7 @@ app.views.EmberPage =
app.views.ExpressPage = app.views.ExpressPage =
app.views.GoPage = app.views.GoPage =
app.views.InfluxdataPage = app.views.InfluxdataPage =
app.views.KnockoutPage =
app.views.KotlinPage = app.views.KotlinPage =
app.views.LaravelPage = app.views.LaravelPage =
app.views.LodashPage = app.views.LodashPage =

@ -5,6 +5,16 @@ module Docs
root_page? ? root : other root_page? ? root : other
css('pre > code').each do |node| css('pre > code').each do |node|
node.parent['data-language'] = node.content =~ /\A\s*</ || node.content.include?('data-bind="') ? 'markup' : 'javascript'
node.before(node.children).remove
end
css('pre').each do |node|
node.content = node.content.strip_heredoc
node['data-language'] ||= node['class'].try(:[], /brush:(.*)/, 1)
end
css('.highlighter-rouge').each do |node|
node.before(node.children).remove node.before(node.children).remove
end end

@ -3,7 +3,7 @@ module Docs
self.name = 'Knockout.js' self.name = 'Knockout.js'
self.slug = 'knockout' self.slug = 'knockout'
self.type = 'knockout' self.type = 'knockout'
self.release = '3.4.0' self.release = '3.4.1'
self.base_url = 'http://knockoutjs.com/documentation/' self.base_url = 'http://knockoutjs.com/documentation/'
self.root_path = 'introduction.html' self.root_path = 'introduction.html'
@ -17,9 +17,9 @@ module Docs
extenders.html extenders.html
deferred-updates.html deferred-updates.html
unobtrusive-event-handling.html unobtrusive-event-handling.html
fn.html
microtasks.html microtasks.html
asynchronous-error-handling.html asynchronous-error-handling.html
fn.html
amd-loading.html) amd-loading.html)
options[:only_patterns] = [ options[:only_patterns] = [

Loading…
Cancel
Save