笙默考试管理系统-MyExamTest----codemirror(65)

发布时间:2024年01月10日

笙默考试管理系统-MyExamTest----codemirror(65

??

目录

一、 笙默考试管理系统-MyExamTest----codemirror

二、 笙默考试管理系统-MyExamTest----codemirror

三、 笙默考试管理系统-MyExamTest----codemirror

四、 笙默考试管理系统-MyExamTest----codemirror

五、 笙默考试管理系统-MyExamTest----codemirror

  • 笙默考试管理系统-MyExamTest----codemirror

??}

????function endtag(startOfLine) {

????????return function(type) {

????????????if (type == "selfcloseTag" ||

????????????????(type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase())))

????????????????return cont();

????????????if (type == "endTag") {pushContext(curState.tagName, startOfLine); return cont();}

????????????return cont();

????????};

????}

????function endclosetag(err) {

????????return function(type) {

????????????if (err) setStyle = "error";

????????????if (type == "endTag") { popContext(); return cont(); }

?

???setStyle = "error";

????????????return cont(arguments.callee);

????????}

????}

????function attributes(type) {

????????if (type == "word") {setStyle = "attribute"; return cont(attributes);}

????????if (type == "equals") return cont(attvalue, attributes);

????????if (type == "string") {setStyle = "error"; return cont(attributes);}

????????return pass();

????}

????function attvalue(type) {

????????if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();}

????????if (type == "string") return cont(attvaluemaybe);

????????return pass();

????}

????function attvaluemaybe(type) {

????????if (type == "string") return cont(attvaluemaybe);

????????else return pass();

????}

  • 笙默考试管理系统-MyExamTest----codemirror

????return {

????????startState: function() {

????????????return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null};

????????},

????????token: function(stream, state) {

????????????if (stream.sol()) {

????????????????state.startOfLine = true;

????????????????state.indented = stream.indentation();

????????????}

????????????if (stream.eatSpace()) return null;

????????????setStyle = type = tagName = null;

????????????var style = state.tokenize(stream, state);

????????????state.type = type;

????????????if ((style || type) && style != "comment") {

????????????????curState = state;

????????????????while (true) {

????????????????????var comb = state.cc.pop() || element;

????????????????????if (comb(type || style)) break;

????????????????}

????????????}

????????????state.startOfLine = false;

????????????return setStyle || style;

????????},

  • 笙默考试管理系统-MyExamTest----codemirror

????????indent: function(state, textAfter, fullLine) {

????????????var context = state.context;

????????????if ((state.tokenize != inTag && state.tokenize != inText) ||

????????????????context && context.noIndent)

????????????????return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;

????????????if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;

  • 笙默考试管理系统-MyExamTest----codemirror

????????????if (context && /^<\//.test(textAfter))

????????????????context = context.prev;

????????????while (context && !context.startOfLine)

????????????????context = context.prev;

????????????if (context) return context.indent + indentUnit;

????????????else return 0;

????????},

文章来源:https://blog.csdn.net/N201871643/article/details/135512666
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。