basic_extra_line/
basic-extra-line.rs

1/// Double lines
2fn main() {
3    // create an editor that adds an empty line after each line
4    let editor = linurgy::factory::appender("\n", 1);
5
6    // note the single line breaks
7    let input = "example line\nanother line\n";
8
9    let output = editor.edit(input);
10
11    // note the double line breaks
12    let expected = "example line\n\nanother line\n\n";
13
14    assert_eq!(expected, output);
15
16    print!("input:\n{}\noutput:\n{}", input, output);
17}