linux-china / jetbrains-just-plugin

JetBrains Just Command Runner Plugin
https://plugins.jetbrains.com/plugin/18658-just
Apache License 2.0
35 stars 6 forks source link

Syntax highlighting fails with double quotes inside triple quotes #23

Closed NiceGuyIT closed 4 months ago

NiceGuyIT commented 4 months ago

JetBrains Just plugin version: 0.4.1

When using double quotes inside [triple backticks][1], the syntax is incorrect. A picture is worth a thousand words.

image

Removing the double quotes in the first block makes the syntax highlighter happy!

image

Here's the text for testing.

set positional-arguments := true
set shell := ['nu', '-c']
set export := true

export SOME_DIR := "some/dir"

export NU_VAR := ```
        $nu
        print $"Hello World"
        let $something = "nothing"
        $nu

Require a command to be available

[private] require-command command:

!/usr/bin/env nu

print $" '{{ command }}' "


Some of the other issues mention the need for rewriting the lexer and/or token analyzer to fix parsing issues. I understand if that's the case for this issue as well.

Thanks for an awesome plugin!

[1]: https://just.systems/man/en/chapter_33.html?highlight=backtick#command-evaluation-using-backticks
linux-china commented 4 months ago

Fixed, and a new version uploaded to JetBrains plugin repository and waiting for approval. Snip20240228_2

linux-china commented 4 months ago

Fixed with version 0.4.3

NiceGuyIT commented 4 months ago

TYVM! Awesome turnaround time.