Update Twig to 3.1.1 and update previous versions
Unified · Split
| @@ -798,7 +798,7 @@ credits = [ · 797 unmodified lines | |||
| 798 | 'https://raw.githubusercontent.com/python-trio/trio/master/LICENSE.MIT' | 798 | 'https://raw.githubusercontent.com/python-trio/trio/master/LICENSE.MIT' |
| 799 | ], [ | 799 | ], [ |
| 800 | 'Twig', | 800 | 'Twig', |
| 801 | '2009-2018 The Twig Team', | 801 | '2009-2020 The Twig Team', |
| 802 | 'BSD', | 802 | 'BSD', |
| 803 | 'https://twig.symfony.com/license' | 803 | 'https://twig.symfony.com/license' |
| 804 | ], [ | 804 | ], [ |
| @@ -2,7 +2,8 @@ module Docs · 1 unmodified line | |||
| 2 | class Twig | 2 | class Twig |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | css('.infobar', '.offline-docs', '.headerlink').remove | 5 | |
| 6 | css('.infobar', '.offline-docs', '.headerlink', '.linenos').remove | ||
| 6 | 7 | ||
| 7 | css('.builtin-reference', '.admonition-wrapper', 'h1 > code', 'h2 > code', '.body-web', '.reference em').each do |node| | 8 | css('.builtin-reference', '.admonition-wrapper', 'h1 > code', 'h2 > code', '.body-web', '.reference em').each do |node| |
| 8 | node.before(node.children).remove | 9 | node.before(node.children).remove |
| @@ -33,7 +34,23 @@ module Docs · 24 unmodified lines | |||
| 33 | node['style'] = 'text-align: center' | 34 | node['style'] = 'text-align: center' |
| 34 | end | 35 | end |
| 35 | 36 | ||
| 37 | # syntax highlight | ||
| 38 | css('.highlight').each do |node| | ||
| 39 | node.css('pre').each do |subnode| | ||
| 40 | subnode['data-language'] = 'php' | ||
| 41 | subnode.add_class('highlight') | ||
| 42 | end | ||
| 43 | end | ||
| 44 | |||
| 45 | # fix code blocks style | ||
| 46 | css('.highlighttable').each do |node| | ||
| 47 | code = node.at_css('pre') | ||
| 48 | node.before(code) | ||
| 49 | node.remove | ||
| 50 | end | ||
| 51 | |||
| 36 | doc | 52 | doc |
| 53 | |||
| 37 | end | 54 | end |
| 38 | end | 55 | end |
| 39 | end | 56 | end |
| @@ -11,7 +11,7 @@ module Docs · 10 unmodified lines | |||
| 11 | options[:attribution] = <<-HTML | 11 | options[:attribution] = <<-HTML |
| 12 | © 2009–2018 by the Twig Team<br> | 12 | © 2009–2018 by the Twig Team<br> |
| 13 | Licensed under the three clause BSD license.<br> | 13 | Licensed under the three clause BSD license.<br> |
| 14 | The Twig logo is © 2010–2018 Symfony | 14 | The Twig logo is © 2010–2020 Symfony |
| 15 | HTML | 15 | HTML |
| 16 | 16 | ||
| 17 | html_filters.push 'twig/clean_html', 'twig/entries' | 17 | html_filters.push 'twig/clean_html', 'twig/entries' |
| @@ -19,13 +19,18 @@ module Docs · 1 unmodified line | |||
| 19 | options[:container] = 'div.bd > div.content' | 19 | options[:container] = 'div.bd > div.content' |
| 20 | options[:skip] = %w(deprecated.html advanced_legacy.html) | 20 | options[:skip] = %w(deprecated.html advanced_legacy.html) |
| 21 | 21 | ||
| 22 | version '3' do | ||
| 23 | self.release = '3.1.1' | ||
| 24 | self.base_url = 'https://twig.symfony.com/doc/3.x/' | ||
| 25 | end | ||
| 26 | |||
| 22 | version '2' do | 27 | version '2' do |
| 23 | self.release = '2.5.0' | 28 | self.release = '2.14.1' |
| 24 | self.base_url = 'https://twig.symfony.com/doc/2.x/' | 29 | self.base_url = 'https://twig.symfony.com/doc/2.x/' |
| 25 | end | 30 | end |
| 26 | 31 | ||
| 27 | version '1' do | 32 | version '1' do |
| 28 | self.release = '1.34.3' | 33 | self.release = '1.44.1' |
| 29 | self.base_url = 'https://twig.symfony.com/doc/1.x/' | 34 | self.base_url = 'https://twig.symfony.com/doc/1.x/' |
| 30 | end | 35 | end |
| 31 | 36 | ||
| @@ -33,5 +38,6 @@ module Docs · 1 unmodified line | |||
| 33 | tags = get_github_tags('twigphp', 'Twig', opts) | 38 | tags = get_github_tags('twigphp', 'Twig', opts) |
| 34 | tags[0]['name'][1..-1] | 39 | tags[0]['name'][1..-1] |
| 35 | end | 40 | end |
| 41 | |||
| 36 | end | 42 | end |
| 37 | end | 43 | end |
Binary file not shown.
Binary file not shown.
| @@ -1 +1 @@ | |||
| 1 | http://twig.sensiolabs.org/images/twig-logo.png | 1 | https://twig.symfony.com/images/logo.png |