lib/assets/javascripts/utils/xml.codemirror.js
File xml.codemirror.js
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
Function inText
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function inText(stream, state) {
function chain(parser) {
state.tokenize = parser;
return parser(stream, state);
}
Function indent
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
indent: function(state, textAfter, fullLine) {
var context = state.context;
// Indent multi-line strings (e.g. css).
if (state.tokenize.isInAttribute) {
if (state.tagStart == state.indented)
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return state.tagStart + indentUnit * multilineTagIndentFactor;
Avoid too many return
statements within this function. Open
Open
if (context) return context.indent + indentUnit;
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return ok ? "atom" : "error";
Avoid too many return
statements within this function. Open
Open
if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
Avoid too many return
statements within this function. Open
Open
return "meta";
Avoid too many return
statements within this function. Open
Open
return "word";
Avoid too many return
statements within this function. Open
Open
else return 0;
Avoid too many return
statements within this function. Open
Open
return "tag bracket";
Avoid too many return
statements within this function. Open
Open
return state.tagStart + state.tagName.length + 2;