app/assets/javascripts/puffer/codemirror/css.js
File css.js
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
CodeMirror.defineMode("css", function(config) {
var indentUnit = config.indentUnit, type;
var atMediaTypes = keySet([
"all", "aural", "braille", "handheld", "print", "projection", "screen",
Function token
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
token: function(stream, state) {
// Use these terms when applicable (see http://www.xanthir.com/blog/b4E50)
//
// rule** or **ruleset:
Function tokenBase
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("def", stream.current());}
else if (ch == "/" && stream.eat("*")) {
state.tokenize = tokenCComment;
Avoid deeply nested control flow statements. Open
Open
if (atMediaTypes[stream.current()]) {
style = "attribute"; // Known attribute
} else if (/^(only|not)$/i.test(stream.current())) {
style = "keyword";
} else if (stream.current().toLowerCase() == "and") {
Avoid deeply nested control flow statements. Open
Open
} else if (context == "@mediaType") {
if (atMediaTypes[stream.current()]) {
style = "attribute";
} else if (stream.current().toLowerCase() == "and") {
style = "operator";
Avoid too many return
statements within this function. Open
Open
return ret(null, ch);
Avoid too many return
statements within this function. Open
Open
return ret("keyword", "important");
Avoid too many return
statements within this function. Open
Open
return ret("number", "unit");
Avoid too many return
statements within this function. Open
Open
return ret("property", "variable");
Avoid too many return
statements within this function. Open
Open
return ret("meta", "meta");
Avoid too many return
statements within this function. Open
Open
return ret("qualifier", "qualifier");
Avoid too many return
statements within this function. Open
Open
return ret("number", "unit");
Avoid too many return
statements within this function. Open
Open
return ret(null, "select-op");
Avoid too many return
statements within this function. Open
Open
return state.tokenize(stream, state);
Avoid too many return
statements within this function. Open
Open
return ret("property", "variable");
Avoid too many return
statements within this function. Open
Open
return ret("operator", ch);
Avoid too many return
statements within this function. Open
Open
return ret("atom", "hash");