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

Some tokens have the wrong string content #5

Open
aryx opened this issue Jul 9, 2021 · 1 comment
Open

Some tokens have the wrong string content #5

aryx opened this issue Jul 9, 2021 · 1 comment

Comments

@aryx
Copy link
Contributor

aryx commented Jul 9, 2021

See https://returntocorp.slack.com/archives/C01NXGX2EHZ/p1625677111141200

[pad@yrax yy (vue_p2)]$ cat ~/hello.vue 
<script>
hello
world
</script>
[pad@yrax yy (vue_p2)]$ semgrep-core -lang vue -dump_tree_sitter_cst ~/hello.vue 
+ /home/pad/yy/_build/default/src/cli/Main.exe -lang vue -dump_tree_sitter_cst /home/pad/hello.vue
[0.104  Info       Main.Dune__exe__Main ] loaded log_config.json
[0.104  Info       Main.Dune__exe__Main ] Executed as: /home/pad/yy/_build/default/src/cli/Main.exe -lang vue -dump_tree_sitter_cst /home/pad/hello.vue
[0.104  Info       Main.Dune__exe__Main ] Version: semgrep-core version: v0.57.0-26-g6a669dcb-dirty, pfff: 0.42
|   Script_elem
|   |   "<"
|   |   script
|   |   ">"
|   |   helloworld
|   |   "</"
|   |   script
|   |   ">"
@mjambon
Copy link
Member

mjambon commented Jul 9, 2021

[note to self]
I suspect it has to do with Src_file.get_region and the "safe" substring extraction functions in that module of the runtime library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants