Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

2 participants

@davewasmer

The build step was throwing encoding conversion errors (ASCII-8 to UTF-8). Added a force_encoding to the rdiscount generated TOC.

@parkr
Owner

Did this always produce the correct output? I'd hate for someone to have 0 content compiled because of this.

@parkr
Owner

Yo, would you please write tests for this?

@parkr parkr closed this in 036fce8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/jekyll/converters/markdown.rb
View
2  lib/jekyll/converters/markdown.rb
@@ -120,7 +120,7 @@ def convert(content)
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'
Something went wrong with that request. Please try again.