Skip to main content

is_markdown_fence_delimiter

Function is_markdown_fence_delimiter 

Source
pub fn is_markdown_fence_delimiter(line: &str) -> bool
Expand description

Whether line opens or closes a fenced markdown code block.

Matches CommonMark-style ``` / ~~~ fences with up to three leading spaces. Shared so plan-markup stripping in the binary and markdown rendering in vtcode-ui cannot drift.

assert!(is_markdown_fence_delimiter("```text"));
assert!(is_markdown_fence_delimiter("   ~~~"));
assert!(!is_markdown_fence_delimiter("    ```"));
assert!(!is_markdown_fence_delimiter("`inline`"));