lib/gitdocs/rendering.rb in gitdocs-0.4.11 vs lib/gitdocs/rendering.rb in gitdocs-0.4.12
- old
+ new
@@ -15,9 +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)
- @text = @text.encode('utf-8') if @text.respond_to?(:encode)
+ @text = @text.force_encoding('utf-8') if @text.respond_to?(:force_encoding)
@markdown.render(@text)
end
end
\ No newline at end of file