Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base#adapt_source modifies input string in-place #40

Closed
denisdefreyne opened this issue Mar 11, 2013 · 1 comment
Closed

Base#adapt_source modifies input string in-place #40

denisdefreyne opened this issue Mar 11, 2013 · 1 comment
Assignees

Comments

@denisdefreyne
Copy link

Kramdown::Parser::Base#adapt_source modifies the encoding of the input string in-place (source). I don’t believe it should; input arguments should not be touched.

Possible fix: replace

source.encode!('UTF-8')

with

source = source.encode('UTF-8')

(Related nanoc issues: nanoc/nanoc#276, nanoc/nanoc#277)

@gettalong
Copy link
Owner

Yep, you are right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants