Skip to main content

count_blockquote_level

Function count_blockquote_level 

Source
pub fn count_blockquote_level(line_content: &str) -> usize
Expand description

Count the number of blockquote markers (>) at the start of a line.

Handles both compact (>>text) and spaced (> > text) blockquote syntax.

ยงExamples

use rumdl_lib::utils::blockquote::count_blockquote_level;

assert_eq!(count_blockquote_level("regular text"), 0);
assert_eq!(count_blockquote_level("> quoted"), 1);
assert_eq!(count_blockquote_level(">> nested"), 2);
assert_eq!(count_blockquote_level("> > spaced nested"), 2);