MCPcopy Create free account
hub / github.com/TruthHun/BookStack / parseOptions

Function parseOptions

static/editor.md/lib/codemirror/addon/lint/lint.js:66–72  ·  view source on GitHub ↗
(cm, options)

Source from the content-addressed store, hash-verified

64 }
65
66 function parseOptions(cm, options) {
67 if (options instanceof Function) return {getAnnotations: options};
68 if (!options || options === true) options = {};
69 if (!options.getAnnotations) options.getAnnotations = cm.getHelper(CodeMirror.Pos(0, 0), "lint");
70 if (!options.getAnnotations) throw new Error("Required option 'getAnnotations' missing (lint addon)");
71 return options;
72 }
73
74 function clearMarks(cm) {
75 var state = cm.state.lint;

Callers 1

lint.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected