lib/gitdocs/rendering.rb in gitdocs-0.4.7 vs lib/gitdocs/rendering.rb in gitdocs-0.4.8
- old
+ new
@@ -15,8 +15,9 @@
# API. This instance has no extensions enabled whatsoever,
# and no accessors to change this. 100% pure, standard
# Markdown.
class RedcarpetCompat
def to_html(*_dummy)
- @markdown.render(@text.encode('utf-8'))
+ @text = @text.encode('utf-8') if @text.respond_to?(:encode)
+ @markdown.render(@text)
end
end
\ No newline at end of file