mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-26 05:14:06 +01:00
I mean, do this instead.
This assumes that it uses Markdown
This commit is contained in:
parent
f942dea58d
commit
af2b9045d8
1 changed files with 3 additions and 1 deletions
|
@ -76,7 +76,9 @@ def remove_extras(entry: dict):
|
|||
entry[key] = re.sub(r'^(\s+)', r'', entry[key])
|
||||
entry[key] = re.sub(r'(\s+)$', r'', entry[key])
|
||||
# Double characters
|
||||
entry[key] = re.sub(r' {2,}', r' ', entry[key])
|
||||
entry[key] = re.sub(r' {2,}(?!\n)', r' ', entry[key])
|
||||
entry[key] = re.sub(r' {3,}\n', r' ', entry[key])
|
||||
entry[key] = re.sub(r'\n{3,}', r'\n\n', entry[key])
|
||||
entry[key] = re.sub(r'r\/{2,}', r'r\/', entry[key])
|
||||
entry[key] = re.sub(r',{2,}', r',', entry[key])
|
||||
# Psuedo-empty strings
|
||||
|
|
Loading…
Reference in a new issue