Skip to content

Commit

Permalink
fix edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Borstelmann committed Nov 7, 2016
1 parent 080966e commit d2ad5c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/atom-underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ module.exports = {
if (errorLineNumber === 1) {
atom.notifications.addWarning('Your Underscore template has errors.');
} else {
if (error.toString().substring(30) !== '<' && error.toString().substring(30) !== '>') {
if (error.toString().substring(30) !== '<'
&& error.toString().substring(30) !== '>'
&& error.toString().substring(30) !== ')'
&& error.toString().substring(30) !== '('
&& error.toString().substring(30) !== '{'
&& error.toString().substring(30) !== '}') {
atom.notifications.addWarning('Your Underscore template has an error at line ' + errorLineNumber);
} else {
atom.notifications.addWarning('Your Underscore template has errors.');
Expand Down

0 comments on commit d2ad5c4

Please sign in to comment.