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

笙默考试管理系统-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;

        },

  • 18
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

N201871643

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值