We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 181883f commit cffa43dCopy full SHA for cffa43d
1 file changed
src/util.rs
@@ -148,16 +148,11 @@ pub fn sanitize_keyword(sc: Cow<str>) -> Cow<str> {
148
}
149
150
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
- };
156
if s.contains("\n\n ") {
157
let ss: Vec<_> = s.split("\n\n").map(|s| s.trim_start()).collect();
158
ss.join("\n\n").into()
159
} else {
160
- s
+ s.into()
161
162
163
0 commit comments