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

Incorrect highlighting on shell parameter expansion "${var%]}" #285

Open
RoyalDonkey opened this issue Jan 12, 2025 · 0 comments
Open

Incorrect highlighting on shell parameter expansion "${var%]}" #285

RoyalDonkey opened this issue Jan 12, 2025 · 0 comments

Comments

@RoyalDonkey
Copy link

RoyalDonkey commented Jan 12, 2025

The closing square bracket is what's causing the problem, even though it is legal syntax.

Minimal reproducible example

#!/bin/bash

a='abc[]'

a="${a%]}"
printf "Something broke here!\n"

if false; then
    echo 'Just showing some further code'
    echo 'Ooops!'
fi

Screenshots

  1. Working
    image
  2. Not working
    image

System information

tree-sitter version 0.24.3
neovim version v0.10.2

Apologies if this was already reported.

@RoyalDonkey RoyalDonkey changed the title Incorrect highlighting on shell parameter expansion "${var#]}" Incorrect highlighting on shell parameter expansion "${var%]}" Jan 12, 2025
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

No branches or pull requests

1 participant