Skip to content
Snippets Groups Projects
Commit ab455f22 authored by Michael Zhou's avatar Michael Zhou Committed by Marijn Haverbeke
Browse files

[dtd mode] Fix code that lacks side-effects

The 6 "n"s are reported as suspicious code by Closure Compiler.
They can just be empty statements instead.
parent aa0b2496
No related branches found
No related tags found
No related merge requests found
......@@ -114,17 +114,17 @@ CodeMirror.defineMode("dtd", function(config) {
if( textAfter.match(/\]\s+|\]/) )n=n-1;
else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
if(textAfter.substr(0,1) === "<")n;
else if( type == "doindent" && textAfter.length > 1 )n;
if(textAfter.substr(0,1) === "<") {}
else if( type == "doindent" && textAfter.length > 1 ) {}
else if( type == "doindent")n--;
else if( type == ">" && textAfter.length > 1)n;
else if( type == "tag" && textAfter !== ">")n;
else if( type == ">" && textAfter.length > 1) {}
else if( type == "tag" && textAfter !== ">") {}
else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
else if( type == "tag")n++;
else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n;
else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule") {}
else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
else if( textAfter === ">")n;
else if( textAfter === ">") {}
else n=n-1;
//over rule them all
if(type == null || type == "]")n--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment