We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b72add commit 8cee321Copy full SHA for 8cee321
lib/src/processing/whitespace.dart
@@ -226,8 +226,7 @@ class WhitespaceProcessing {
226
/// (4) Replace any instances of two or more spaces with a single space.
227
static String _removeUnnecessaryWhitespace(String text) {
228
return text
229
- .replaceAll(RegExp(r" *(?=\n)"), "")
230
- .replaceAll(RegExp(r"(?<=\n) *"), "")
+ .replaceAll(RegExp(r" *\n *"), "\n")
231
.replaceAll("\n", " ")
232
.replaceAll("\t", " ")
233
.replaceAll(RegExp(r" {2,}"), " ");
0 commit comments