class Kramdown::Parser::Base
def adapt_source(source)
Modify the string +source+ to be usable by the parser (unifies line ending characters to
def adapt_source(source) if source.respond_to?(:encode) raise "The encoding of the source text is not valid!" if !source.valid_encoding? source = source.encode('UTF-8') end source.gsub(/\r\n?/, "\n").chomp + "\n" end