From cdc5478fa9a194fd37e0a4a9e2816285e307d402 Mon Sep 17 00:00:00 2001 From: hhsprings Date: Mon, 9 Nov 2015 17:34:26 +0900 Subject: The { is not required. See `comment-11592775 `_. --- pygments/lexers/configs_pkgmng.py | 6 ++---- tests/examplefiles/pkgconfig_example.pc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pygments/lexers/configs_pkgmng.py b/pygments/lexers/configs_pkgmng.py index 1c5e6f99..5012930f 100644 --- a/pygments/lexers/configs_pkgmng.py +++ b/pygments/lexers/configs_pkgmng.py @@ -9,8 +9,6 @@ :license: BSD, see LICENSE for details. """ -import re - from pygments.lexer import RegexLexer, bygroups, include, words from pygments.token import Text, Comment, Operator, Name, \ Punctuation, String, Keyword @@ -51,8 +49,8 @@ class PkgConfigLexer(RegexLexer): (r'.', Text), ], 'interp': [ - # you can escape literal "${" as "$${" - (r'\$\$\{', Text), + # you can escape literal "$" as "$$" + (r'\$\$', Text), # variable references (r'\$\{', String.Interpol, 'curly'), diff --git a/tests/examplefiles/pkgconfig_example.pc b/tests/examplefiles/pkgconfig_example.pc index b7969bad..2a59204e 100644 --- a/tests/examplefiles/pkgconfig_example.pc +++ b/tests/examplefiles/pkgconfig_example.pc @@ -3,7 +3,7 @@ prefix=/usr/local/opt/site/private # define variable `prefix` exec_prefix=${prefix} # using variable reference libdir=${exec_prefix}/lib includedir=${prefix}/include -just_for_test=$${this is not a part of variable reference} # escape with `$${` +just_for_test=$${this is not a part of variable reference} # escape with `$$` Name: YAPHatchPotchGen Description: Yet Another Portable HatchPotch GENerator. -- cgit v1.2.1