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

Handle UTF-8 offsets as such #1130

Merged

Conversation

vincentisambart
Copy link
Contributor

Closes #1129

UTF-8 offsets were incorrectly used as character offsets so I fixed that.

@vincentisambart
Copy link
Contributor Author

The failure does not seem to be due to my change, but to SourceryTests/SourcerySpec.swift referencing an absolute path not writable for most people.

try! result!.write(toFile: "/Users/merowing/Desktop/test.txt", atomically: true, encoding: .utf8)

Changing it to something like /tmp/sourcery-test.txt seems to fix it. Should I add that change to this PR?

@krzysztofzablocki
Copy link
Owner

Ah that's some left over test code 🙈 we can remove that

@krzysztofzablocki krzysztofzablocki merged commit 5fa6328 into krzysztofzablocki:master Jan 20, 2023
@krzysztofzablocki
Copy link
Owner

brought to master, thanks for contributing 🙇

@vincentisambart vincentisambart deleted the utf8-indices branch January 20, 2023 22:25
@vincentisambart
Copy link
Contributor Author

Thanks for reviewing and merging 😄

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.

Crash when non-ASCII characters in comment
2 participants