diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 581a7c6c..15b7227a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -297,7 +297,7 @@ credits = [ 'https://raw.githubusercontent.com/mochajs/mocha/master/LICENSE' ], [ 'Modernizr', - '2009-2014 Modernizr', + '2009-2016 The Modernizr team', 'MIT', 'https://modernizr.com/license/' ], [ diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js index d99b401b..cdb37277 100644 --- a/assets/javascripts/vendor/prism.js +++ b/assets/javascripts/vendor/prism.js @@ -1,4 +1,4 @@ -/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+c+cpp+coffeescript+ruby+elixir+go+lua+nginx+perl+php+python+rust+sql+typescript */ +/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+c+cpp+coffeescript+ruby+elixir+go+json+lua+nginx+perl+php+python+rust+sql+typescript */ var _self = (typeof window !== 'undefined') ? window // if in browser : ( @@ -1006,6 +1006,18 @@ Prism.languages.go = Prism.languages.extend('clike', { }); delete Prism.languages.go['class-name']; +Prism.languages.json = { + 'property': /".*?"(?=\s*:)/ig, + 'string': /"(?!:)(\\?[^"])*?"(?!:)/g, + 'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g, + 'punctuation': /[{}[\]);,]/g, + 'operator': /:/g, + 'boolean': /\b(true|false)\b/gi, + 'null': /\bnull\b/gi, +}; + +Prism.languages.jsonp = Prism.languages.json; + Prism.languages.lua = { 'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m, // \z may be used to skip the following space diff --git a/assets/javascripts/views/pages/javascript.coffee b/assets/javascripts/views/pages/javascript.coffee index 0dcbfc52..4873d1e0 100644 --- a/assets/javascripts/views/pages/javascript.coffee +++ b/assets/javascripts/views/pages/javascript.coffee @@ -20,7 +20,6 @@ app.views.GruntPage = app.views.LodashPage = app.views.MarionettePage = app.views.MochaPage = -app.views.ModernizrPage = app.views.MongoosePage = app.views.SinonPage = app.views.JavascriptPage diff --git a/assets/javascripts/views/pages/simple.coffee b/assets/javascripts/views/pages/simple.coffee index 9443555f..3ab94f70 100644 --- a/assets/javascripts/views/pages/simple.coffee +++ b/assets/javascripts/views/pages/simple.coffee @@ -11,6 +11,7 @@ app.views.EmberPage = app.views.ExpressPage = app.views.GoPage = app.views.MeteorPage = +app.views.ModernizrPage = app.views.MomentPage = app.views.NodePage = app.views.PerlPage = diff --git a/lib/docs/filters/modernizr/clean_html.rb b/lib/docs/filters/modernizr/clean_html.rb index 8916c543..1f8c0edc 100644 --- a/lib/docs/filters/modernizr/clean_html.rb +++ b/lib/docs/filters/modernizr/clean_html.rb @@ -3,7 +3,9 @@ module Docs class CleanHtmlFilter < Filter def call css('pre').each do |node| - node.content = node.content + class_name = node.at_css('code')['class'] + node['data-language'] = class_name[/lang-(\w+)/, 1] if class_name + node.content = node.content.strip_heredoc end css('sub').each do |node| diff --git a/lib/docs/scrapers/modernizr.rb b/lib/docs/scrapers/modernizr.rb index d288c4ff..0b69cd6c 100644 --- a/lib/docs/scrapers/modernizr.rb +++ b/lib/docs/scrapers/modernizr.rb @@ -2,7 +2,7 @@ module Docs class Modernizr < UrlScraper self.name = 'Modernizr' self.type = 'modernizr' - self.release = '3.2.0' + self.release = '3.3.1' self.base_url = 'https://modernizr.com/docs/' html_filters.push 'modernizr/entries', 'modernizr/clean_html', 'title' @@ -12,7 +12,7 @@ module Docs options[:skip_links] = true options[:attribution] = <<-HTML - © 2009–2015 Modernizr
+ © 2009–2016 The Modernizr team
Licensed under the MIT License. HTML end