Skip to main content

MAX_STYLE_DEPTH

Constant MAX_STYLE_DEPTH 

Source
pub const MAX_STYLE_DEPTH: usize = 32;
Expand description

Maximum number of simultaneously-open inline-style spans.

Beyond this depth, additional StyleStack::open calls are silently ignored. This bounds reader memory under adversarial or pathologically nested input. The limit matches the historical HTML-style stack used in the markdown reader.