Skip to content

Commit a3491bf

Browse files
peterbeIwanBurg
authored andcommitted
Improved preserve_handlebar_syntax regex
1 parent f4ded0b commit a3491bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

premailer/premailer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def transform(self, html=None, pretty_print=True, **kwargs):
345345
# <a href="{{ "<Test>" }}"></a>
346346
if self.preserve_handlebar_syntax:
347347
stripped = re.sub(
348-
r'="{{(.*?)}}"',
348+
r'="([^"]*){{(.*?)}}([^"]*?)"',
349349
lambda match: '="{{' + escape(match.groups()[0]) + '}}"',
350350
stripped,
351351
)

0 commit comments

Comments
 (0)