Sha256: c391657923b5c490e4b2f3716664ff7261a7b399eac666845490e492f48515a3

Contents?: true

Size: 1.04 KB

Versions: 22

Compression:

Stored size: 1.04 KB

Contents

# -*- coding: utf-8 -*- #

module Rouge
  module Lexers
    load_lexer 'jinja.rb'

    class Twig < Jinja
      title "Twig"
      desc "Twig template engine (twig.sensiolabs.org)"

      tag "twig"

      filenames '*.twig'

      mimetypes 'application/x-twig', 'text/html+twig'

      def self.keywords
        @@keywords ||= %w(as do extends flush from import include use else starts
                          ends with without autoescape endautoescape block endblock
                          embed endembed filter endfilter for endfor if endif
                          macro endmacro sandbox endsandbox set endset
                          spaceless endspaceless verbatim endverbatim)
      end

      def self.tests
        @@tests ||= %w(constant defined divisibleby empty even iterable null odd
                       sameas)
      end

      def self.pseudo_keywords
        @@pseudo_keywords ||= %w(true false none)
      end

      def self.word_operators
        @@word_operators ||= %w(b-and b-or b-xor is in and or not)
      end
    end
  end
end

Version data entries

22 entries across 20 versions & 5 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/rouge-2.2.1/lib/rouge/lexers/twig.rb
rouge-3.2.1 lib/rouge/lexers/twig.rb
rouge-3.2.0 lib/rouge/lexers/twig.rb
rouge_ecl-1.0.0 lib/rouge/lexers/twig.rb
rouge_ecl-0.0.1 lib/rouge/lexers/twig.rb
rouge-3.1.1 lib/rouge/lexers/twig.rb
rouge-3.1.0 lib/rouge/lexers/twig.rb
rouge-3.0.0 lib/rouge/lexers/twig.rb
rouge-2.2.1 lib/rouge/lexers/twig.rb
rouge-2.2.0 lib/rouge/lexers/twig.rb
rougegal-2.1.2 lib/rouge/lexers/twig.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/twig.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/twig.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.1.1/lib/rouge/lexers/twig.rb
rouge-2.1.1 lib/rouge/lexers/twig.rb
rouge-2.1.0 lib/rouge/lexers/twig.rb
tdiary-5.0.4 vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/twig.rb
rouge-2.0.7 lib/rouge/lexers/twig.rb
rouge-2.0.6 lib/rouge/lexers/twig.rb
rouge-2.0.5 lib/rouge/lexers/twig.rb