Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors
This commit is contained in:
parent
677a87e437
commit
f7f64576e5
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue