Sha256: 451d4b11401d831abc8d8330a0e33742354438b1257842b763ee0292af3b3852

Contents?: true

Size: 672 Bytes

Versions: 18

Compression:

Stored size: 672 Bytes

Contents

module Locomotive
  module Wagon
    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
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.5.8 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.7 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.6 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.5 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.4 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.3 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.2 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.1 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.0 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.5.0.rc1 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.4.0 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.3.3 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.3.2 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.3.1 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.2.2 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.2.1 lib/locomotive/wagon/liquid/tags/hybrid.rb
locomotivecms_wagon-1.2.0 lib/locomotive/wagon/liquid/tags/hybrid.rb