# File lib/wikicloth/wiki_buffer/link.rb, line 49
  def new_char()
    case
    when @checktrailing && current_char !~ /\w/
      self.current_param = self.data
      self.data = current_char == '{' ? "" : current_char
      return false

    # check if this link is internal or external
    when previous_char.blank? && current_char == '['
      self.internal_link = true

    # Marks the beginning of another paramater for
    # the current object
    when current_char == '|' && self.internal_link == true && @in_quotes == false
      self.current_param = self.data
      self.data = ""
      self.params << ""

    # URL label
    when current_char == ' ' && self.internal_link == false && params[1].nil? && !self.data.blank?
      self.current_param = self.data
      self.data = ""
      self.params << ""

    # end of link
    when current_char == ']' && ((previous_char == ']' && self.internal_link == true) || self.internal_link == false)  && @in_quotes == false
      self.current_param = self.data
      if self.internal_link == true
        self.data.chop!.rstrip!
        self.params << "" unless self.params.size > 1
        @checktrailing = true
      else
        self.data = ""
        return false
      end
    else
      self.data += current_char unless current_char == ' ' && self.data.blank?
    end

    return true
  end