MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / cleaned_section_lines

Function cleaned_section_lines

scripts/lint_note.py:1257–1277  ·  view source on GitHub ↗
(body: str)

Source from the content-addressed store, hash-verified

1255
1256
1257def 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
1280def normalized_section_content(body: str) -> str:

Callers 2

text_unitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected