Skip to content

Commit

Permalink
Handlebars: Fix empty strings, add plus sign in exponential notation,…
Browse files Browse the repository at this point in the history
… improve block pattern and variable pattern.
  • Loading branch information
Golmote committed Aug 23, 2015
1 parent bbe68ac commit c477f9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions components/prism-handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
pattern: /^\{\{\{?|\}\}\}?$/i,
alias: 'punctuation'
},
'string': /(["'])(\\?.)+?\1/,
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/,
'string': /(["'])(\\?.)*?\1/,
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/,
'boolean': /\b(true|false)\b/,
'block': {
pattern: /^(\s*~?\s*)[#\/]\S+/i,
pattern: /^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,
lookbehind: true,
alias: 'keyword'
},
Expand All @@ -26,7 +26,7 @@
}
},
'punctuation': /[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,
'variable': /[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/
'variable': /[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion components/prism-handlebars.min.js

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

0 comments on commit c477f9a

Please sign in to comment.