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

Import correctly the files when one of the files contains an emoji #198

Merged
merged 3 commits into from Feb 20, 2019

Conversation

Projects
None yet
2 participants
@f-meloni
Copy link
Member

f-meloni commented Feb 19, 2019

Swift tries to simplify the string.count by returning 1 for an emoji even if that is actually created with more than one char.
That means that we can not use count to adjust the range if there are emoticons in the string

@@ -10,7 +10,7 @@ public final class DangerFileGenerator {

importsRegex.enumerateMatches(in: content, options: [], range: NSRange(location: 0, length: content.count), using: { result, _, _ in

This comment has been minimized.

@DangerCI

DangerCI Feb 19, 2019

  • ⚠️ Line should be 120 characters or less: currently 140 characters (line_length)
@DangerCI

This comment has been minimized.

Copy link

DangerCI commented Feb 19, 2019

Warnings
⚠️

Sources/Danger-Swift/Fake.swift#L1 - Files should have a single trailing newline. (trailing_newline)

Generated by 🚫 Danger Swift against 05e4bb0

f-meloni added some commits Feb 19, 2019

@f-meloni f-meloni merged commit e707ab0 into master Feb 20, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@f-meloni f-meloni deleted the fix_file_import_with_emojis branch Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.