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

发布时间:2024年01月05日

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

??

目录

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

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

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

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

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

noIndent: noIndent

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

?function inBlock(style, terminator) {

????????return function(stream, state) {

????????????while (!stream.eol()) {

????????????????if (stream.match(terminator)) {

????????????????????state.tokenize = inText;

????????????????????break;

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

????????????????stream.next();

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

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

????????????return style;

????????};

????}

????function doctype(depth) {

????????return function(stream, state) {

????????????var ch;

????????????while ((ch = stream.next()) != null) {

????????????????if (ch == "<") {

????????????????????state.tokenize = doctype(depth + 1);

????????????????????return state.tokenize(stream, state);

????????????????} else if (ch == ">") {

????????????????????if (depth == 1) {

????????????????????????state.tokenize = inText;

????????????????????????break;

????????????????????} else {

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

????????????????????????state.tokenize = doctype(depth - 1);

????????????????????????return state.tokenize(stream, state);

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

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

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

????????????return "meta";

????????};

????}

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

????var curState, setStyle;

????function pass() {

????????for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);

????}

????function cont() {

????????pass.apply(null, arguments);

????????return true;

????}

????function pushContext(tagName, startOfLine) {

????????var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent);

????????curState.context = {

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

????????????prev: curState.context,

????????????tagName: tagName,

????????????indent: curState.indented,

????????????startOfLine: startOfLine,

????????????noIndent: noIndent

????????};

????}

????function popContext() {

????????if (curState.context) curState.context = curState.context.prev;

????}

????function element(type) {

????????if (type == "openTag") {

????????????curState.tagName = tagName;

????????????return cont(attributes, endtag(curState.startOfLine));

????????} else if (type == "closeTag") {

????????????var err = false;

????????????if (curState.context) {

????????????????err = curState.context.tagName != tagName;

????????????} else {

????????????????err = true;

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

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

????????????return cont(endclosetag(err));

????????}

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

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