Update app.py
Browse files
app.py
CHANGED
|
@@ -78,20 +78,15 @@ def _runs_plain(text: str) -> str:
|
|
| 78 |
def _runs_multiline(text: str) -> str:
|
| 79 |
"""
|
| 80 |
๋ค์ค ์ค ํ
์คํธ๋ฅผ ์์ ํ๊ฒ ํ์:
|
| 81 |
-
- ๊ฐ ์ค์ ๋
๋ฆฝ
|
| 82 |
-
- ์ค ์ฌ์ด์ ์ ๋กํญ๊ณต๋ฐฑ run + <hp:lineBreak/> ์ฝ์
|
| 83 |
-
ํ ์
/ํน์ ๋ฌธ๋จ ์คํ์ผ์์ baseline์ด ์ ๋ฐ๋๋ ๋ฌธ์ ๋ฅผ ๋ณด์.
|
| 84 |
"""
|
| 85 |
if text is None:
|
| 86 |
return ""
|
| 87 |
lines = str(text).replace("\r\n", "\n").split("\n")
|
| 88 |
parts = []
|
| 89 |
-
for
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
parts.append("<hp:run><hp:t>​</hp:t></hp:run>")
|
| 93 |
-
parts.append("<hp:lineBreak/>")
|
| 94 |
-
parts.append(f"<hp:run><hp:t>{html.escape(ln)}</hp:t></hp:run>")
|
| 95 |
return "".join(parts)
|
| 96 |
|
| 97 |
def _apply_to_xml(xml: str, mapping: Dict[str, str], dbg: dict) -> str:
|
|
|
|
| 78 |
def _runs_multiline(text: str) -> str:
|
| 79 |
"""
|
| 80 |
๋ค์ค ์ค ํ
์คํธ๋ฅผ ์์ ํ๊ฒ ํ์:
|
| 81 |
+
- ๊ฐ ์ค์ ์์ ๋
๋ฆฝ <hp:p> ๋ฌธ๋จ์ผ๋ก ์์ฑ
|
|
|
|
|
|
|
| 82 |
"""
|
| 83 |
if text is None:
|
| 84 |
return ""
|
| 85 |
lines = str(text).replace("\r\n", "\n").split("\n")
|
| 86 |
parts = []
|
| 87 |
+
for ln in lines:
|
| 88 |
+
escaped = html.escape(ln)
|
| 89 |
+
parts.append(f"<hp:p><hp:run><hp:t>{escaped}</hp:t></hp:run></hp:p>")
|
|
|
|
|
|
|
|
|
|
| 90 |
return "".join(parts)
|
| 91 |
|
| 92 |
def _apply_to_xml(xml: str, mapping: Dict[str, str], dbg: dict) -> str:
|