Update Twig to 3.1.1 and update previous versions
Showing the changes to lib/docs (2 of 6 files). Show all
Unified · Split
| @@ -2,7 +2,8 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Twig |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − css('.infobar', '.offline-docs', '.headerlink').remove | |
| 5 | + | |
| 6 | + css('.infobar', '.offline-docs', '.headerlink', '.linenos').remove | |
| 6 | 7 | |
| 7 | 8 | css('.builtin-reference', '.admonition-wrapper', 'h1 > code', 'h2 > code', '.body-web', '.reference em').each do |node| |
| 8 | 9 | node.before(node.children).remove |
| @@ -33,7 +34,23 @@ module Docs · 24 unmodified lines | ||
| 33 | 34 | node['style'] = 'text-align: center' |
| 34 | 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 | 52 | doc |
| 53 | + | |
| 37 | 54 | end |
| 38 | 55 | end |
| 39 | 56 | end |
| @@ -11,7 +11,7 @@ module Docs · 10 unmodified lines | ||
| 11 | 11 | options[:attribution] = <<-HTML |
| 12 | 12 | © 2009–2018 by the Twig Team<br> |
| 13 | 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 | 15 | HTML |
| 16 | 16 | |
| 17 | 17 | html_filters.push 'twig/clean_html', 'twig/entries' |
| @@ -19,13 +19,18 @@ module Docs · 1 unmodified line | ||
| 19 | 19 | options[:container] = 'div.bd > div.content' |
| 20 | 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 | 27 | version '2' do |
| 23 | − self.release = '2.5.0' | |
| 28 | + self.release = '2.14.1' | |
| 24 | 29 | self.base_url = 'https://twig.symfony.com/doc/2.x/' |
| 25 | 30 | end |
| 26 | 31 | |
| 27 | 32 | version '1' do |
| 28 | − self.release = '1.34.3' | |
| 33 | + self.release = '1.44.1' | |
| 29 | 34 | self.base_url = 'https://twig.symfony.com/doc/1.x/' |
| 30 | 35 | end |
| 31 | 36 | |
| @@ -33,5 +38,6 @@ module Docs · 1 unmodified line | ||
| 33 | 38 | tags = get_github_tags('twigphp', 'Twig', opts) |
| 34 | 39 | tags[0]['name'][1..-1] |
| 35 | 40 | end |
| 41 | + | |
| 36 | 42 | end |
| 37 | 43 | end |