Skip to content

Commit

Permalink
Windows encoding fun. One assertion left.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki Izumi authored and gjtorikian committed Oct 11, 2016
1 parent 8bd2514 commit 183d3bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/commonmarker/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module CommonMarker
class Renderer
attr_accessor :in_tight, :warnings, :in_plain
def initialize
@stream = StringIO.new
@stream = StringIO.new("".force_encoding("utf-8"))
@need_blocksep = false
@warnings = Set.new []
@in_tight = false
Expand Down
3 changes: 2 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
require 'commonmarker'
require 'minitest/autorun'
require 'minitest/pride'
Expand All @@ -20,7 +21,7 @@ def open_spec_file(filename)
header_re = Regexp.new('#+ ')
filepath = File.join('ext', 'commonmarker', 'cmark', 'test', filename)

File.readlines(filepath).each do |line|
File.readlines(filepath, encoding: "utf-8").each do |line|
line_number += 1

l = line.strip
Expand Down

0 comments on commit 183d3bf

Please sign in to comment.