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

Function isHeader

static/editor.md/lib/codemirror/addon/fold/markdown-fold.js:17–20  ·  view source on GitHub ↗
(lineNo)

Source from the content-addressed store, hash-verified

15 var maxDepth = 100;
16
17 function isHeader(lineNo) {
18 var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));
19 return tokentype && /\bheader\b/.test(tokentype);
20 }
21
22 function headerLevel(lineNo, line, nextLine) {
23 var match = line && line.match(/^#+/);

Callers 1

headerLevelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected