lib/commonmarker.rb in commonmarker-0.23.2 vs lib/commonmarker.rb in commonmarker-0.23.4

- old
+ new

@@ -21,12 +21,10 @@ # Returns a {String} of converted HTML. def self.render_html(text, options = :DEFAULT, extensions = []) raise TypeError, "text must be a String; got a #{text.class}!" unless text.is_a?(String) opts = Config.process_options(options, :render) - text = text.encode('UTF-8') - html = Node.markdown_to_html(text, opts, extensions) - html.force_encoding('UTF-8') + Node.markdown_to_html(text.encode('UTF-8'), opts, extensions) end # Public: Parses a Markdown string into a `document` node. # # string - {String} to be parsed