reflow_table

Function reflow_table 

Source
pub fn reflow_table(lines: &[String]) -> Vec<String>
Expand description

Reflow a Markdown table so columns align uniformly.

Invalid tables are returned unchanged.

ยงExamples

use mdtablefix::reflow_table;
let lines = vec![
    "| A | B |    |".to_string(),
    "| 1 | 2 |  | 3 | 4 |".to_string(),
];
let expected = vec![
    "| A | B |".to_string(),
    "| 1 | 2 |".to_string(),
    "| 3 | 4 |".to_string(),
];
assert_eq!(reflow_table(&lines), expected);