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

f-meloni
Copy link
Member

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@DangerCI
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 f-meloni merged commit e707ab0 into master Feb 20, 2019
@f-meloni f-meloni deleted the fix_file_import_with_emojis branch February 20, 2019 22:09
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

2 participants