( state: StateBlock, startLine: number, endLine: number, silent: boolean )
| 49 | } |
| 50 | |
| 51 | function block( |
| 52 | state: StateBlock, |
| 53 | startLine: number, |
| 54 | endLine: number, |
| 55 | silent: boolean |
| 56 | ): boolean { |
| 57 | const start = state.bMarks[startLine] + state.tShift[startLine]; |
| 58 | const finish = state.eMarks[startLine]; |
| 59 | |
| 60 | if (!state.src.startsWith(OPEN, start)) return false; |
| 61 | |
| 62 | const tagEnd = findTagEnd(state.src, start); |
| 63 | const lastPossible = state.src.slice(0, finish).trim().length; |
| 64 | |
| 65 | if (!tagEnd || tagEnd < lastPossible - CLOSE.length) return false; |
| 66 | |
| 67 | const contentStart = start + OPEN.length; |
| 68 | const content = state.src.slice(contentStart, tagEnd).trim(); |
| 69 | const lines = state.src |
| 70 | .slice(start, tagEnd + CLOSE.length) |
| 71 | .split('\n').length; |
| 72 | |
| 73 | if (content[0] === '$') return false; |
| 74 | |
| 75 | if (silent) return true; |
| 76 | |
| 77 | const token = createToken(state, content, contentStart); |
| 78 | token.map = [startLine, startLine + lines]; |
| 79 | state.line += lines; |
| 80 | return true; |
| 81 | } |
| 82 | |
| 83 | function inline(state: StateInline, silent: boolean): boolean { |
| 84 | if (!state.src.startsWith(OPEN, state.pos)) return false; |
nothing calls this directly
no test coverage detected
searching dependent graphs…