class Kramdown::Parser::Kramdown

def parse_smart_quotes

Parse the smart quotes at current location.
def parse_smart_quotes
  start_line_number = @src.current_line_number
  substs = SQ_RULES.find {|reg, subst| @src.scan(reg)}[1]
  substs.each do |subst|
    if subst.kind_of?(Integer)
      add_text(@src[subst])
    else
      val = SQ_SUBSTS[[subst, @src[subst.to_s[-1,1].to_i]]] || subst
      @tree.children << Element.new(:smart_quote, val, nil, :location => start_line_number)
    end
  end
end