summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
authorasylumfunk <asylumfunk@gmail.com>2014-03-02 01:33:17 -0800
committerasylumfunk <asylumfunk@gmail.com>2014-03-02 01:33:17 -0800
commiteea3ac45dadb7f90318ec1cc5cb92c3d2dc0079d (patch)
treec62be27419c9a3542b3cc4e9f43a18efa726e3d7 /tests/test_basic_api.py
parent76830a64b219cc2fd76b7ae7de12b717375a6793 (diff)
downloadpygments-eea3ac45dadb7f90318ec1cc5cb92c3d2dc0079d.tar.gz
Fix Makefile highlighting with target expansion
Currently, when the lexer encounters a Makefile target specified with a variable, i.e. `$(VARIABLE_TARGET): prerequisite', it fails to properly highlight the remainder of the file. This happens as BaseMakefileLexer sees the `$' character, assumes it's shell code, and delegates to BashLexer. The remainder of the file is then mistakenly interpreted as shell code. This patch corrects this behavior and properly highlights entire Makefiles, regardless of target syntax. By specifying all shell-specific regular expressions AFTER all Makefile-specific regular expressions, we can ensure that the latter are given priority over the former.
Diffstat (limited to 'tests/test_basic_api.py')
0 files changed, 0 insertions, 0 deletions