summaryrefslogtreecommitdiffstats
path: root/src/modules/line_break.rs
blob: 5cbe3a1a9f3460452afe9bca28e2067e1e499403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{Context, Module};

/// Creates a module for the line break
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
    const LINE_ENDING: &str = "\n";

    let mut module = context.new_module("line_break")?;

    module.get_prefix().set_value("");
    module.get_suffix().set_value("");

    module.new_segment("character", LINE_ENDING);

    Some(module)
}