Skip to content

Commit cffa43d

Browse files
committed
rm newline
1 parent 181883f commit cffa43d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/util.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,11 @@ pub fn sanitize_keyword(sc: Cow<str>) -> Cow<str> {
148148
}
149149

150150
pub fn respace(s: &str) -> Cow<'_, str> {
151-
let s: Cow<_> = if s.contains(r"\n") {
152-
s.replace(r"\n", "\n").into()
153-
} else {
154-
s.into()
155-
};
156151
if s.contains("\n\n ") {
157152
let ss: Vec<_> = s.split("\n\n").map(|s| s.trim_start()).collect();
158153
ss.join("\n\n").into()
159154
} else {
160-
s
155+
s.into()
161156
}
162157
}
163158

0 commit comments

Comments
 (0)