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

add support for UTF-8 [ready, waiting for review] #36

Closed
wants to merge 1 commit into from

Conversation

matkoniecz
Copy link

@matkoniecz matkoniecz commented Jun 7, 2017

downcase, upcase is not working for letters like ę ("ę".upcase returns ę, it should return Ę)

It is workaround for https://bugs.ruby-lang.org/issues/10085

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)}"] }.

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'

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.

Copy link
Author

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).

@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 100.0% when pulling c420661 on matkoniecz:UTF-8_support into 63bbf50 on iancanderson:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 100.0% when pulling c420661 on matkoniecz:UTF-8_support into 63bbf50 on iancanderson:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 100.0% when pulling c420661 on matkoniecz:UTF-8_support into 63bbf50 on iancanderson:master.

@coveralls
Copy link

coveralls commented Jun 7, 2017

Coverage Status

Coverage increased (+0.009%) to 96.296% when pulling c420661 on matkoniecz:UTF-8_support into 63bbf50 on iancanderson:master.

@matkoniecz
Copy link
Author

Before that changes parslet was emitting massive amount of warnings, including complaints that [ęę] has duplicate entries in regexp match group.

It both silences warnings and fixes a potential bug with unrecognised capital accented letters.

@matkoniecz matkoniecz changed the title add support for UTF-8 add support for UTF-8 [ready, waiting for review] Nov 5, 2018
@matkoniecz
Copy link
Author

closing as this project is dead and abandoned

@matkoniecz matkoniecz closed this Dec 1, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants