lib/murdoc/paragraph.rb in murdoc-0.1.3 vs lib/murdoc/paragraph.rb in murdoc-0.1.5

- old
+ new

@@ -32,16 +32,16 @@ Markdown.new(annotation, :smart).to_html end def formatted_source @formatted_source ||= if pygments_installed? && options[:highlight_source] - IO.popen("pygmentize -l #{source_type} -f html", "w+") do |pipe| + IO.popen("pygmentize -l #{source_type} -O encoding=UTF8 -f html -O nowrap", "w+") do |pipe| pipe.puts source pipe.close_write pipe.read end else - "<pre>" + CGI.escapeHTML(source) + "</pre>" + CGI.escapeHTML(source) end end protected def pygments_installed? \ No newline at end of file