def text(parent, indent = nil, multiline_or_print = true)
      # Try to see if we can match a multiline operator. If we can accept_stripped only
      # multiline, which is the case for filters, undo the operation.
      if accept :multiline
        multiline = true
      elsif multiline_or_print
        return nil unless lookahead :print_lookahead
      end

      # Get text node type
      type = accept(:print) ? :print : :text

      # Get leading whitespace
      leading_whitespace = accept(:leading_whitespace)

      # Get trailing whitespace
      trailing_whitespace = accept(:trailing_whitespace)

      # Check if the text or print node is escaped or unescaped
      escaped = accept(:unescaped_value) ? false : true

      # Get text value
      value = accept :line_feed
      value = value[1..-1] if value[0] == '\\'

      # Create the text node using input data
      text_node = [
        :plain,
        type,
        {
          value: value.strip,
          escaped: escaped,
          leading_whitespace: leading_whitespace,
          trailing_whitespace: trailing_whitespace
        },
        nil,
        indent
      ]

      # If we have a multiline node, get all the text which has higher
      # indentation than our indentation node.
      if multiline
        text_node[@options][:value] += accept(:newline) || ''
        text_node[@options][:value] += get_indented_lines(indent)
        text_node[@options][:value].strip!
      elsif value.empty?
        # If our value is empty and we're not going to add any more lines to
        # our buffer, skip the node
        return nil
      end

      # Increase indentation if this is an inline text node
      text_node[@indent] += @settings[:indent] unless multiline_or_print

      # Add text node to the parent element
      parent[@children] << text_node
    end
def text(parent, indent = nil, multiline_or_print = true)
      # Try to see if we can match a multiline operator. If we can accept_stripped only
      # multiline, which is the case for filters, undo the operation.
      if accept :multiline
        multiline = true
      elsif multiline_or_print
        return nil unless lookahead :print_lookahead
      end

      # Get text node type
      type = accept(:print) ? :print : :text

      # Get leading whitespace
      leading_whitespace = accept(:leading_whitespace)

      # Get trailing whitespace
      trailing_whitespace = accept(:trailing_whitespace)

      # Check if the text or print node is escaped or unescaped
      escaped = accept(:unescaped_value) ? false : true

      # Get text value
      value = accept :line_feed
      value = value[1..-1] if value[0] == '\\'

      # Create the text node using input data
      text_node = [
        :plain,
        type,
        {
          value: value.strip,
          escaped: escaped,
          leading_whitespace: leading_whitespace,
          trailing_whitespace: trailing_whitespace
        },
        nil,
        indent
      ]

      # If we have a multiline node, get all the text which has higher
      # indentation than our indentation node.
      if multiline
        text_node[@options][:value] += accept(:newline) || ''
        text_node[@options][:value] += get_indented_lines(indent)
        text_node[@options][:value].strip!
      elsif value.empty?
        # If our value is empty and we're not going to add any more lines to
        # our buffer, skip the node
        return nil
      end

      # Increase indentation if this is an inline text node
      text_node[@indent] += @settings[:indent] unless multiline_or_print

      # Add text node to the parent element
      parent[@children] << text_node
    end
Match one line or multiline, escaped or unescaped text

 @param parent [Array] Parent node element
 @param indent [Fixnum] Size of the current indentation
 @param multiline_or_print [Boolean] Allow only multiline text or print