microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.46k stars 3.6k forks source link

[Bug] Wrong highlight for shell #2899

Open ricenoddle opened 2 years ago

ricenoddle commented 2 years ago

Reproducible in vscode.dev or in VS Code Desktop?

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

Do not use playground to try this. Using home page editor demo to try the following code.

if [[ -z "${MA5800_ALL_DIR:-}" ]]; then
    MA5800_ALL_DIR=$(realpath "$(dirname "$0")/../../")
fi

Actual Behavior

image

So I tried this code in vs-code, the highlight is correct.

image

Expected Behavior

My expected behavior is the highlight can as same as vs-code

Additional Context

No response

hediet commented 2 years ago

Looks like the last quotation mark is also wrong. We're more than happy to accept a PR for this!

ricenoddle commented 2 years ago

Yes, looks like the last quote make the monarch think the quotation is not finished