Expand description
Marker constants and regex patterns for markdown-code-runner.
Constants§
- CODE_
COMMENT_ BASH_ START - Bash code comment start marker.
- CODE_
COMMENT_ END - Code comment end marker.
- CODE_
COMMENT_ PYTHON_ START - Python code comment start marker.
- OUTPUT_
END - Output end marker.
- OUTPUT_
START - Output start marker.
- SKIP
- Skip marker to prevent code execution.
- WARNING
- Warning comment inserted in output sections.
Statics§
- CODE_
BACKTICKS_ END_ PATTERN - Pattern to match backtick code block end.
- CODE_
BACKTICKS_ START_ PATTERN - Pattern to match backtick code block start with markdown-code-runner.
- CODE_
COMMENT_ BASH_ START_ PATTERN - Pattern to match Bash code comment start with optional leading whitespace.
- CODE_
COMMENT_ END_ PATTERN - Pattern to match code comment end with optional leading whitespace.
- CODE_
COMMENT_ PYTHON_ START_ PATTERN - Pattern to match Python code comment start with optional leading whitespace.
- OUTPUT_
END_ PATTERN - Pattern to match output end with optional leading whitespace.
- OUTPUT_
START_ PATTERN - Pattern to match output start with optional leading whitespace.
- SKIP_
PATTERN - Pattern to match skip marker with optional leading whitespace.
Functions§
- get_
indent - Extract leading whitespace from a line.
- is_
code_ backticks_ end - Check if a line matches the backticks code block end marker.
- is_
code_ backticks_ start - Check if a line matches the backticks code block start marker.
- is_
code_ comment_ bash_ start - Check if a line matches the Bash code comment start marker.
- is_
code_ comment_ end - Check if a line matches the code comment end marker.
- is_
code_ comment_ python_ start - Check if a line matches the Python code comment start marker.
- is_
output_ end - Check if a line matches the output end marker.
- is_
output_ start - Check if a line matches the output start marker.
- is_skip
- Check if a line matches the skip marker.
- md_
comment - Format a string as a Markdown comment.
- remove_
md_ comment - Remove Markdown comment tags from a string. Returns None if the string is not a valid Markdown comment.