From ef77260efa1122cba42eb97dcadb771ba354276a Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 13 Oct 2022 18:13:08 +0200 Subject: Fix cr, crlf in code (fenced) for mdast --- src/to_mdast.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/to_mdast.rs b/src/to_mdast.rs index fe5bd82..39f6bc5 100644 --- a/src/to_mdast.rs +++ b/src/to_mdast.rs @@ -1721,11 +1721,11 @@ fn trim_eol(value: String, at_start: bool, at_end: bool) -> String { if at_end && end > start { if bytes[end - 1] == b'\n' { end -= 1; - } else if bytes[end - 1] == b'\r' { - end -= 1; - if end > start && bytes[end - 1] == b'\n' { + if end > start && bytes[end - 1] == b'\r' { end -= 1; } + } else if bytes[end - 1] == b'\r' { + end -= 1; } } -- cgit