small improvement in spacing in dictionary
Browse files- lsj_dict.py +2 -2
lsj_dict.py
CHANGED
@@ -150,8 +150,8 @@ def format_text(data):
|
|
150 |
pattern = r"\s+([,;:.()\"\'\[\]])\s+"
|
151 |
text = re.sub(pattern, r"\1 ", text)
|
152 |
|
153 |
-
pattern_2 = r"(\S)
|
154 |
-
text = re.sub(pattern_2, r"\1
|
155 |
# .replace(",", ", ").replace(";", "; ").replace(":", ": ").replace("(", " (").replace(")", ") ").replace("[", " [").replace("]", "] ").replace(" ,", ", ").replace(" ; ", "; ").replace(" : ", ": ").replace(" ." , ". ")
|
156 |
|
157 |
formatted_text = []
|
|
|
150 |
pattern = r"\s+([,;:.()\"\'\[\]])\s+"
|
151 |
text = re.sub(pattern, r"\1 ", text)
|
152 |
|
153 |
+
pattern_2 = r"(\S)([,;:.()\"\'\[\]])(\S)"
|
154 |
+
text = re.sub(pattern_2, r"\1\2 \3", text)
|
155 |
# .replace(",", ", ").replace(";", "; ").replace(":", ": ").replace("(", " (").replace(")", ") ").replace("[", " [").replace("]", "] ").replace(" ,", ", ").replace(" ; ", "; ").replace(" : ", ": ").replace(" ." , ". ")
|
156 |
|
157 |
formatted_text = []
|