Skip to content

Commit

Permalink
Twig: Prevent "other" pattern from matching blank strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Aug 24, 2015
1 parent 53d5839 commit cae2cef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/prism-twig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Prism.languages.twig = {

// The rest can be parsed as HTML
'other': {
pattern: /[\s\S]*/,
// We want non-blank matches
pattern: /\S(?:[\s\S]*\S)?/,
inside: Prism.languages.markup
}
};
2 changes: 1 addition & 1 deletion components/prism-twig.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cae2cef

Please sign in to comment.