Skip to content

Commit fe35085

Browse files
committed
Force Pandoc to return UTF8
1 parent a354c92 commit fe35085

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_ruby_libs/text_rendering.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
# Converts RST to Markdown
88
def rst_to_md(rst)
99
begin
10-
return PandocRuby.convert(rst, :from => :rst, :to => :markdown)
10+
# For some reason, Pandoc is converting UTF-8 into ASCII which then kills kramdown
11+
return PandocRuby.convert(rst, :from => :rst, :to => :markdown).force_encoding(Encoding::UTF_8)
1112
rescue Exception => e
1213
return "Could not convert RST to MD: "+e.to_s
1314
end

0 commit comments

Comments
 (0)