History

Merge pull request #1403 from MasterEnoc/twig

Update Twig to 3.1.1 and update previous versions

Simon Legner committed 5 years ago

Commit c0dbaaf2 parents 23a0004 71d2b496 files · +27 −4Browse files

Unified · Split

6 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/twig/clean_html.rb +18 −1
  3. lib/docs/scrapers/twig.rb +9 −3
  4. public/icons/docs/twig/16.png +0 −0
  5. public/icons/docs/twig/16@2x.png +0 −0
  6. public/icons/docs/twig/SOURCE +1 −1
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -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 ], [
lib/docs/filters/twig/clean_html.rb+18−1
@@ -2,7 +2,8 @@ module Docs · 1 unmodified line
2 class Twig2 class Twig
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 css('.infobar', '.offline-docs', '.headerlink').remove5
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).remove9 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 end35 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 doc52 doc
53
37 end54 end
38 end55 end
39 end56 end
lib/docs/scrapers/twig.rb+9−3
@@ -11,7 +11,7 @@ module Docs · 10 unmodified lines
11 options[:attribution] = <<-HTML11 options[:attribution] = <<-HTML
12 &copy; 2009&ndash;2018 by the Twig Team<br>12 &copy; 2009&ndash;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 &copy; 2010&ndash;2018 Symfony14 The Twig logo is &copy; 2010&ndash;2020 Symfony
15 HTML15 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' do27 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 end30 end
26 31
27 version '1' do32 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 end35 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 end40 end
41
36 end42 end
37end43end
public/icons/docs/twig/16.png+0−0

Binary file not shown.

public/icons/docs/twig/16@2x.png+0−0

Binary file not shown.

public/icons/docs/twig/SOURCE+1−1
@@ -1 +1 @@
1http://twig.sensiolabs.org/images/twig-logo.png1https://twig.symfony.com/images/logo.png