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

String content range is not same as location #271

Open
tscpp opened this issue May 28, 2021 · 1 comment
Open

String content range is not same as location #271

tscpp opened this issue May 28, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tscpp
Copy link
Member

tscpp commented May 28, 2021

This applies to all types of strings quoted and double-quoted. I have only found strings in import modules and attributes so far.

The mocha tests are invalid and should be updated too.

<img data-bind="key: value">
[
  {
    loc: {
      first_line: 1,
      last_line: 1,
      first_column: 0,
      last_column: 28,
      range: [0, 28]
    },
    key: 'img',
    nodeType: 2,
    bindings: [
      {
        location: {
          first_line: 1,
          last_line: 1,
          first_column: 15,  // <---
          last_column: 27,   // <---
          range: [16, 26]    // <---
        },
        bindingText: 'key: value'
      }
    ]
  }
]
@tscpp tscpp added the bug Something isn't working label May 28, 2021
@tscpp tscpp changed the title Binding position range is not same as location String content range is not same as location May 28, 2021
@tscpp
Copy link
Member Author

tscpp commented May 28, 2021

It is actually the other way in import modules. The range is bigger than the location 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Triage
Development

No branches or pull requests

1 participant