(body: str)
| 1255 | |
| 1256 | |
| 1257 | def cleaned_section_lines(body: str) -> list[str]: |
| 1258 | lines: list[str] = [] |
| 1259 | for raw_line in body.splitlines(): |
| 1260 | stripped = raw_line.strip() |
| 1261 | if not stripped: |
| 1262 | continue |
| 1263 | if ( |
| 1264 | stripped.startswith("> [!figure]") |
| 1265 | or stripped.startswith("> 建议位置:") |
| 1266 | or stripped.startswith("> 放置原因:") |
| 1267 | or stripped.startswith("> 当前状态:") |
| 1268 | ): |
| 1269 | continue |
| 1270 | if stripped.startswith("!["): |
| 1271 | continue |
| 1272 | if stripped.startswith("*论文原图编号:") and stripped.endswith("*"): |
| 1273 | continue |
| 1274 | if stripped.startswith("> "): |
| 1275 | stripped = stripped[2:].strip() |
| 1276 | lines.append(stripped) |
| 1277 | return lines |
| 1278 | |
| 1279 | |
| 1280 | def normalized_section_content(body: str) -> str: |
no outgoing calls
no test coverage detected