Skip to content

Commit

Permalink
Add basic check for too many parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyorke committed Jul 27, 2016
1 parent 8535d35 commit 512f748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pedant.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ var pedant = {
for (var j = 0; j < lines.length; j++) {
text = lines[j];
for (var i = 0; i < text.length; i++) {
if ("(".indexOf(text[i]) > -1) {
if ("(".indexOf(text[i + 1]) > -1) {
printError("too many parenthesis", "PunctuationError", j, i);
}
}

if (punctuation.indexOf(text[i]) > -1) {
if (punctuationAmount == 0) {
punctuationStartIndex = i;
Expand Down

0 comments on commit 512f748

Please sign in to comment.