Skip to main content

escape_table_cell

Function escape_table_cell 

Source
fn escape_table_cell(s: &str) -> String
Expand description

Escape a value so it is safe inside a markdown (GFM) table cell:

  • replace | with \| (column separator)
  • replace newlines with <br/> (cells must be one logical line)
  • replace \r so CRLF natspec doesn’t create stray spaces