Upload app.py
Browse files
app.py
CHANGED
|
@@ -16,8 +16,6 @@ def set_outline_level(paragraph, level: int = 0):
|
|
| 16 |
pPr.append(outline)
|
| 17 |
|
| 18 |
def normalize_paragraph(text):
|
| 19 |
-
# 移除所有換行(包括
|
| 20 |
-
, Word 的換行符)
|
| 21 |
text = re.sub(r'[\r\n]+', ' ', text)
|
| 22 |
# 壓縮多餘空白
|
| 23 |
text = re.sub(r'\s{2,}', ' ', text)
|
|
|
|
| 16 |
pPr.append(outline)
|
| 17 |
|
| 18 |
def normalize_paragraph(text):
|
|
|
|
|
|
|
| 19 |
text = re.sub(r'[\r\n]+', ' ', text)
|
| 20 |
# 壓縮多餘空白
|
| 21 |
text = re.sub(r'\s{2,}', ' ', text)
|