Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors

This commit is contained in:
Dave Wasmer 2013-03-17 22:28:33 +01:00 committed by Parker Moore
parent 677a87e437
commit f7f64576e5
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ module Jekyll
rd = RDiscount.new(content, *@rdiscount_extensions)
html = rd.to_html
if rd.generate_toc and html.include?(@config['rdiscount']['toc_token'])
html.gsub!(@config['rdiscount']['toc_token'], rd.toc_content)
html.gsub!(@config['rdiscount']['toc_token'], rd.toc_content.force_encoding('utf-8'))
end
html
when 'maruku'