(state: StateBlock, startLine: int, endLine: int, silent: bool)
| 8 | |
| 9 | |
| 10 | def code(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: |
| 11 | LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine, silent) |
| 12 | |
| 13 | if not state.is_code_block(startLine): |
| 14 | return False |
| 15 | |
| 16 | last = nextLine = startLine + 1 |
| 17 | |
| 18 | while nextLine < endLine: |
| 19 | if state.isEmpty(nextLine): |
| 20 | nextLine += 1 |
| 21 | continue |
| 22 | |
| 23 | if state.is_code_block(nextLine): |
| 24 | nextLine += 1 |
| 25 | last = nextLine |
| 26 | continue |
| 27 | |
| 28 | break |
| 29 | |
| 30 | state.line = last |
| 31 | |
| 32 | token = state.push("code_block", "code", 0) |
| 33 | token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n" |
| 34 | token.map = [startLine, state.line] |
| 35 | |
| 36 | return True |
nothing calls this directly
no test coverage detected
searching dependent graphs…