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

Function getLineStyles

static/editor.md/lib/codemirror/lib/codemirror.js:6667–6676  ·  view source on GitHub ↗
(cm, line, updateFrontier)

Source from the content-addressed store, hash-verified

6665 }
6666
6667 function getLineStyles(cm, line, updateFrontier) {
6668 if (!line.styles || line.styles[0] != cm.state.modeGen) {
6669 var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
6670 line.styles = result.styles;
6671 if (result.classes) line.styleClasses = result.classes;
6672 else if (line.styleClasses) line.styleClasses = null;
6673 if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;
6674 }
6675 return line.styles;
6676 }
6677
6678 // Lightweight form of highlight -- proceed over this line and
6679 // update state, but don't save a style array. Used for lines that

Callers 2

codemirror.jsFile · 0.70
buildLineContentFunction · 0.70

Calls 3

highlightLineFunction · 0.70
getStateBeforeFunction · 0.70
lineNoFunction · 0.70

Tested by

no test coverage detected