Method: Liquid::Raw#parse

Defined in:
lib/liquid/tags/raw.rb

#parse(tokens) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/liquid/tags/raw.rb', line 24

def parse(tokens)
  @body = +''
  while (token = tokens.shift)
    if token =~ BlockBody::FullTokenPossiblyInvalid && block_delimiter == Regexp.last_match(2)
      parse_context.trim_whitespace = (token[-3] == WhitespaceControl)
      @body << Regexp.last_match(1) if Regexp.last_match(1) != ""
      return
    end
    @body << token unless token.empty?
  end

  raise_tag_never_closed(block_name)
end