Skip to main content

insert_after_table_separator

Function insert_after_table_separator 

Source
pub fn insert_after_table_separator(
    md: &str,
    header_anchor: &str,
    rows: &[String],
) -> Result<String, String>
Expand description

Insert rows (already newest-first) immediately after the separator line of the table whose header row contains header_anchor (e.g. "| Version |"). Anchoring on the header — rather than the first separator in the file — keeps the insert correct if another table (a legend, say) is ever added above.