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

Fix get_range/1 for binaries #120

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Conversation

rrrene
Copy link
Contributor

@rrrene rrrene commented Jan 18, 2024

Hi congrats on going 1.0.0, that's always the big one.

I played around and found something:

It seems escaped double quotes are not counted in Sourceror.get_range/1:

~S"""
# the following line is 16 chars long, so `end_column` should be 17
"key: \"value\""
"""
|> Sourceror.parse_string!()
|> Sourceror.get_range()
|> dbg

Let me know what you think of this 👍

It seems escaped double quotes are not counted in `Sourceror.get_range/1`:

```elixir
~S"""
"key: \"value\""
"""
|> Sourceror.parse_string!()
|> Sourceror.get_range()
|> dbg
```
Copy link
Owner

@doorgan doorgan left a comment

Choose a reason for hiding this comment

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

Good catch, thank you for the fix!

@doorgan doorgan merged commit 8ebc68b into doorgan:main Jan 18, 2024
6 checks passed
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.

2 participants