ptomato / sublime_autotools

Autotools syntax highlighting for Sublime Text
GNU General Public License v3.0
17 stars 16 forks source link

Syntax broken with an edgy case of recursive variable expansion and quotes #5

Closed felixhao28 closed 7 years ago

felixhao28 commented 7 years ago
# Syntax good so far
$1=${$1-"${am_missing_run}$2"}
# Syntax broken

Found in audioseg code.

ptomato commented 7 years ago

Thanks for the report!

Do you have more context - is this makefile, shell, or M4 code? Could you link to the place in audioseg where it shows up?

felixhao28 commented 7 years ago

The source can be downloaded from It's homepage. The broken line is located on line 710 of ./aclocal.m4.

ptomato commented 7 years ago

In this case, it's a problem with Sublime Text's shell script highlighting. The following shell script will also highlight incorrectly, even without my package:

FOO=foo
BAR=bar
FOO=${FOO-"${BAR}"}
echo "$FOO"

Please report a bug with Sublime Text. Feel free to CC me, if and when it gets fixed I'll make sure it works with the M4 highlighting.

felixhao28 commented 7 years ago

Looks like a known issue https://github.com/sublimehq/Packages/issues/465