OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
markdown_it
/
rules_block
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/14/2024 03:18:15 PM
rwxr-xr-x
📄
__init__.py
553 bytes
05/14/2024 03:18:15 PM
rw-r--r--
📁
__pycache__
-
05/14/2024 03:18:15 PM
rwxr-xr-x
📄
blockquote.py
8.68 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
code.py
859 bytes
05/14/2024 03:18:15 PM
rw-r--r--
📄
fence.py
2.48 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
heading.py
1.71 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
hr.py
1.2 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
html_block.py
2.66 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
lheading.py
2.56 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
list.py
9.44 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
paragraph.py
1.78 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
reference.py
6.02 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
state_block.py
8.22 KB
05/14/2024 03:18:15 PM
rw-r--r--
📄
table.py
6.82 KB
05/14/2024 03:18:15 PM
rw-r--r--
Editing: code.py
Close
"""Code block (4 spaces padded).""" import logging from .state_block import StateBlock LOGGER = logging.getLogger(__name__) def code(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool: LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine, silent) if not state.is_code_block(startLine): return False last = nextLine = startLine + 1 while nextLine < endLine: if state.isEmpty(nextLine): nextLine += 1 continue if state.is_code_block(nextLine): nextLine += 1 last = nextLine continue break state.line = last token = state.push("code_block", "code", 0) token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n" token.map = [startLine, state.line] return True