doorgan / sourceror

Utilities to manipulate Elixir source code
Apache License 2.0
326 stars 22 forks source link

Fix get_range/1 for binaries #120

Closed rrrene closed 9 months ago

rrrene commented 9 months ago

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 :+1: