Skip to content

Javascript object declaration breaking Liquid syntax highlight #157

Open

Description

@muchisx

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

Activity

  1. added
    BugSomething isn't working in the vscode extension
    on Jul 17, 2023
  2. panoply commented on Jul 17, 2023

    @panoply
    Owner

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

  3. panoply commented on Nov 7, 2023

    @panoply
    Owner

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

  4. muchisx commented on Nov 7, 2023

    @muchisx
    CollaboratorAuthor

    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

  5. panoply commented on Nov 7, 2023

    @panoply
    Owner

    Move to another one brother

  6. reopened this on Nov 7, 2023
  7. muchisx commented on Nov 7, 2023

    @muchisx
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working in the vscode extension

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions