From 86c2eee37cf292677032e02f553710d4c1eb1f04 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Wed, 15 Oct 2014 22:13:59 -0700 Subject: Curly brace escaping, round 1. These locations were all found by regexlint and done semi-manually, leaving braces within [] alone (they aren't special in the 'regex' module). --- pygments/lexers/templates.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pygments/lexers/templates.py') diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index e7a2e567..1d0565ad 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -1802,10 +1802,10 @@ class HandlebarsLexer(RegexLexer): 'root': [ (r'[^{]+', Other), - (r'{{!.*}}', Comment), + (r'\{\{!.*\}\}', Comment), - (r'({{{)(\s*)', bygroups(Comment.Special, Text), 'tag'), - (r'({{)(\s*)', bygroups(Comment.Preproc, Text), 'tag'), + (r'(\{\{\{)(\s*)', bygroups(Comment.Special, Text), 'tag'), + (r'(\{\{)(\s*)', bygroups(Comment.Preproc, Text), 'tag'), ], 'tag': [ @@ -1887,7 +1887,7 @@ class LiquidLexer(RegexLexer): # tags and block tags (r'(\{%)(\s*)', bygroups(Punctuation, Whitespace), 'tag-or-block'), # output tags - (r'({{)(\s*)([^\s}]+)', + (r'(\{\{)(\s*)([^\s}]+)', bygroups(Punctuation, Whitespace, using(this, state = 'generic')), 'output'), (r'\{', Text) -- cgit v1.2.1