Sha256: f2d5b1c543bb83aa7f0fef0988498352e85cd9f599d292d7b174c2b154d1e25c

Contents?: true

Size: 605 Bytes

Versions: 28

Compression:

Stored size: 605 Bytes

Contents

module Locomotive
  module Liquid
    module Tags
      class Hybrid < ::Liquid::Block
        def parse(tokens)
          nesting = 0
          tokens.each do |token|
            next unless token =~ IsTag
            if token =~ FullToken
              if nesting == 0 && $1 == block_delimiter
                @render_as_block = true
                super
                return
              elsif $1 == block_name
                nesting += 1
              elsif $1 == block_delimiter
                nesting -= 1
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
locomotive_cms-2.5.7 lib/locomotive/liquid/tags/hybrid.rb
locomotivecms-3.0.0.pre.alpha.2 lib/locomotive/previous_liquid/tags/hybrid.rb
locomotivecms-3.0.0.pre.alpha lib/locomotive/previous_liquid/tags/hybrid.rb
locomotive_cms-2.5.6 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.6.rc2 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.6.rc1 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.5 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.4 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.3 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.2 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.1 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.0 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.0.rc3 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.0.rc2 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.5.0.rc1 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.4.1 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.4.0 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.3.1 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.3.0 lib/locomotive/liquid/tags/hybrid.rb
locomotive_cms-2.2.3 lib/locomotive/liquid/tags/hybrid.rb