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

"in" keyword being erroneously recognized in bigger words (like INterfaces) #5

Open
bitodt opened this issue Oct 9, 2019 · 1 comment

Comments

@bitodt
Copy link

bitodt commented Oct 9, 2019

In this snippet:

else if [host] == "71.331.22.32" {
		if [interface.description] not in

the "in" in "interface" is shown in red, while the "terface.description" is white.

PS: Thanks so much for this plugin!

@joaociocca
Copy link

joaociocca commented Feb 19, 2020

I've been trying this one for quite a while and the only thing that seems to do the trick is moving from .tmLanguage to .sublime-syntax format. \b for boundaries won't work, \s or " " before and/or after the logical operators also won't work.
Changing to .sublime-syntax and adding boundaries does the trick, though.

Another similar issue is with escape characters inside strings:
image

A simple way to solve this is, again after switching to .sublime-syntax, using the default code from package, instead of the current string.text.logstash:

(on main)
    # Strings begin and end with quotes, and use backslashes as an escape
    # character
    - match: '"'
      scope: punctuation.definition.string.begin.logstash
      push: double_quoted_string

(outside main)
  double_quoted_string:
    - meta_scope: string.quoted.double.logstash
    - match: '\\.'
      scope: constant.character.escape.logstash
    - match: '"'
      scope: punctuation.definition.string.end.logstash
      pop: true

image

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 a pull request may close this issue.

2 participants