2019-05-01 20:34:24 +00:00
|
|
|
use super::{Context, Module};
|
2019-04-05 00:33:36 +00:00
|
|
|
|
|
|
|
/// Creates a segment for the line break
|
2019-07-02 20:12:53 +00:00
|
|
|
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
2019-04-05 00:33:36 +00:00
|
|
|
const LINE_ENDING: &str = "\n";
|
|
|
|
|
2019-07-02 20:12:53 +00:00
|
|
|
let mut module = context.new_module("line_break")?;
|
2019-04-12 23:11:40 +00:00
|
|
|
|
2019-05-01 20:34:24 +00:00
|
|
|
module.get_prefix().set_value("");
|
|
|
|
module.get_suffix().set_value("");
|
2019-04-13 03:06:48 +00:00
|
|
|
|
2019-05-01 20:34:24 +00:00
|
|
|
module.new_segment("character", LINE_ENDING);
|
|
|
|
|
|
|
|
Some(module)
|
2019-04-05 00:33:36 +00:00
|
|
|
}
|