angular/packages/language-service
Andrew Scott 3aafa765ee fix(language-service): Correctly parse inputs and selectors with dollar signs (#44268)
When we are going to the definition of an input, we find _both_ the
definition of the input _and_ also look for any directives which have
a selector that matches the input. For example:

```
@Directive({
  selector: '[greeting]'
})
export class MyDir {
  @Input() greeting!: string;
}
```

With this commit, we now correctly handle the case where inputs and/or
selectors have a dollar sign in them. The dollar sign has special
meaning in CSS, but when we encounter the dollar in a template, we need
to escape it when used as a selector so that it is taken as a dollar
literal rather than a character with special meaning.

Previously, we were not escaping the dollar sign and the CSS parsing
logic would throw an error. The change in this commit prevents that
error from happening, but a `try...catch` is still added in case there
is another unhandled use-case. If this happens, we do not want the
`goToDefinition` operation to completely fail.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1574

PR Close #44268
2021-11-29 17:22:12 -05:00
..
bundles refactor(language-service): Move language service code out of ivy/ folder (#44064) 2021-11-10 01:20:04 +00:00
src fix(language-service): Correctly parse inputs and selectors with dollar signs (#44268) 2021-11-29 17:22:12 -05:00
test fix(language-service): Correctly parse inputs and selectors with dollar signs (#44268) 2021-11-29 17:22:12 -05:00
testing refactor: delete the View Engine runtime (#43884) 2021-11-23 21:10:06 +00:00
api.ts refactor(language-service): Remove option and bundle generation for View Engine (#43723) 2021-10-05 17:24:08 -07:00
BUILD.bazel refactor(language-service): Remove View Engine code from language service package (#44064) 2021-11-10 01:20:04 +00:00
build.sh build(language-service): install @angular/language-service in root node_modules (#40058) 2020-12-10 13:48:04 -08:00
index.ts refactor(language-service): Remove option and bundle generation for View Engine (#43723) 2021-10-05 17:24:08 -07:00
package.json feat(core): update node version support range to support v16 (#43740) 2021-10-06 10:55:44 -07:00