diff --git a/lib/src/processing/whitespace.dart b/lib/src/processing/whitespace.dart index 6dc2e74a3f..bf5cf40277 100644 --- a/lib/src/processing/whitespace.dart +++ b/lib/src/processing/whitespace.dart @@ -226,8 +226,7 @@ class WhitespaceProcessing { /// (4) Replace any instances of two or more spaces with a single space. static String _removeUnnecessaryWhitespace(String text) { return text - .replaceAll(RegExp(r" *(?=\n)"), "") - .replaceAll(RegExp(r"(?<=\n) *"), "") + .replaceAll(RegExp(r" *\n *"), "\n") .replaceAll("\n", " ") .replaceAll("\t", " ") .replaceAll(RegExp(r" {2,}"), " "); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy