Skip to main content

split_html_br_lines

Function split_html_br_lines 

Source
pub fn split_html_br_lines(text: &str) -> Vec<&str>
Expand description

Splits a Mermaid label into lines using Mermaid’s <br>-style line breaks.

Mirrors Mermaid’s lineBreakRegex = /<br\\s*\\/?>/gi behavior:

  • allows ASCII whitespace between br and the optional / or >
  • does not accept extra characters (e.g. <br \\t/> with a literal backslash)