Skip to content

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

Open
@RoyalDonkey

Description

@RoyalDonkey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions