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

Javascript object declaration breaking Liquid syntax highlight #157

Open
muchisx opened this issue May 24, 2023 · 5 comments
Open

Javascript object declaration breaking Liquid syntax highlight #157

muchisx opened this issue May 24, 2023 · 5 comments
Labels
Bug Something isn't working in the vscode extension

Comments

@muchisx
Copy link
Collaborator

muchisx commented May 24, 2023

Hi!

So I noticed this, when an object is declared in JS inside a <script> tag on a .liquid file, the highlighting breaks on anything below that declaration.

Like this

image
image

@panoply panoply added the Bug Something isn't working in the vscode extension label Jul 17, 2023
@panoply
Copy link
Owner

panoply commented Jul 17, 2023

Ouff. Good catch. Will do some tests and see what is happening and occurring here.

@panoply
Copy link
Owner

panoply commented Nov 7, 2023

@muchisx can you try on the latest version? This should be fixed.

@muchisx
Copy link
Collaborator Author

muchisx commented Nov 7, 2023

Hey @panoply !

image

✅ Syntax doesnt brake anymore with JS objects declarations!


Maybe totally unrelated but I noticed the IF statemant syntax is no longer detected
I remember setting a color in the following scopes:

"scope": ["entity.name.tag.conditional.liquid", "entity.name.tag.control.liquid"],

but these are not longer detected, should I move it to another issue or this change came with a reason?

image

@panoply
Copy link
Owner

panoply commented Nov 7, 2023

Move to another one brother

@panoply panoply closed this as completed Nov 7, 2023
@muchisx muchisx reopened this Nov 7, 2023
@muchisx
Copy link
Collaborator Author

muchisx commented Nov 7, 2023

Hi @panoply
Just redid some tests, seems like the one with <script> is fixed but the one with {% javascript %} remains as before.

image

{% javascript %}
  const testString = 'test';
  const testNumber = 9999;
  const testBoolean = false;
  const testArray = ['test', 900, false, {}]
  const testObject = {
    test: 'test',
    testtest: 'testtest',
  }
{% endjavascript %}

{% # Testcomment %}

{% comment %}
  Test comment
{% endcomment %}

<script>
  const text = {
    hey: 'hey'
  }
</script>```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working in the vscode extension
Projects
None yet
Development

No branches or pull requests

2 participants