Skip to content

Commit

Permalink
do not use empty character class
Browse files Browse the repository at this point in the history
  • Loading branch information
gflohr committed May 5, 2018
1 parent cf49406 commit 72e1320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/prism-tt2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Prism.languages.tt2 = Prism.languages.extend('clike', {
comment: {
pattern: /#.*|\[%#[^]*?%\]/,
pattern: /#.*|\[%#[\s\S]*?%\]/,
lookbehind: true
},
keyword: /\b(?:GET|CALL|SET|DEFAULT|INSERT|INCLUDE|PROCESS|WRAPPER|BLOCK|IF|UNLESS|ELSIF|ELSE|SWITCH|CASE|FOREACH|IN|WHILE|FILTER|USE|MACRO|RAWPERL|PERL|TRY|THROW|CATCH|FINAL|NEXT|LAST|RETURN|STOP|CLEAR|META|TAGS|DEBUG|END)\b/,
Expand Down Expand Up @@ -54,7 +54,7 @@
delete Prism.languages.tt2.string;

Prism.hooks.add('before-tokenize', function(env) {
var tt2Pattern = /\[%[^]+?%\]/g;
var tt2Pattern = /\[%[\s\S]+?%\]/g;
Prism.languages['markup-templating'].buildPlaceholders(env, 'tt2', tt2Pattern);
});

Expand Down

0 comments on commit 72e1320

Please sign in to comment.