aboutsummaryrefslogtreecommitdiffstats
path: root/src/to_html.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/to_html.rs')
-rw-r--r--src/to_html.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/to_html.rs b/src/to_html.rs
index 6811350..2685120 100644
--- a/src/to_html.rs
+++ b/src/to_html.rs
@@ -216,9 +216,8 @@ pub fn compile(events: &[Event], bytes: &[u8], options: &CompileOptions) -> Stri
if event.kind == Kind::Exit
&& (event.name == Name::BlankLineEnding || event.name == Name::LineEnding)
{
- line_ending_inferred = Some(LineEnding::from_str(
- Slice::from_position(bytes, &Position::from_exit_event(events, index)).as_str(),
- ));
+ let slice = Slice::from_position(bytes, &Position::from_exit_event(events, index));
+ line_ending_inferred = Some(slice.as_str().parse().unwrap());
break;
}