(lineNo)
| 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(/^#+/); |