summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhhsprings <xwhhsprings@gmail.com>2015-11-09 17:34:26 +0900
committerhhsprings <xwhhsprings@gmail.com>2015-11-09 17:34:26 +0900
commitcdc5478fa9a194fd37e0a4a9e2816285e307d402 (patch)
treed90591d893ed3acb9170bfa739bfc82b9189580f
parentc0534a4daf1d1b0f845a64b566bc5c2211e8f0a8 (diff)
downloadpygments-cdc5478fa9a194fd37e0a4a9e2816285e307d402.tar.gz
The { is not required.
See `comment-11592775 <https://bitbucket.org/birkenfeld/pygments-main/pull-requests/517/add-lexers-for-pkg-config-pacmanconf/diff#comment-11592775>`_.
-rw-r--r--pygments/lexers/configs_pkgmng.py6
-rw-r--r--tests/examplefiles/pkgconfig_example.pc2
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.