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
add support for UTF-8 [ready, waiting for review] #36
Conversation
downcase, upcase is not working for letters like ę ("ę".upcase returns ę, it should return Ę)
module Ingreedy | ||
module CaseInsensitiveParser | ||
def stri(str) | ||
key_chars = str.split(//) | ||
key_chars. | ||
map! { |char| match["#{char.upcase}#{char.downcase}"] }. | ||
map! { |char| match["#{Unicode.upcase(char)}#{Unicode.downcase(char)}"] }. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [82/80]
@@ -1,9 +1,11 @@ | |||
require 'unicode' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing magic comment # frozen_string_literal: true.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iancanderson I would be happy to make proposed changes iff that project is revived (at this moment it seems that it is dead and changing PR style would be waste of time).
2 similar comments
Before that changes parslet was emitting massive amount of warnings, including complaints that It both silences warnings and fixes a potential bug with unrecognised capital accented letters. |
closing as this project is dead and abandoned |
downcase, upcase is not working for letters like ę ("ę".upcase returns ę, it should return Ę)
It is workaround for https://bugs.ruby-lang.org/issues/10085