MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / cleanup_markdown_text

Function cleanup_markdown_text

tools/commitlist.py:128–137  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

126
127
128def cleanup_markdown_text(text: str) -> str:
129 cleaned_lines = []
130 for line in strip_html_comments(text).replace("\r\n", "\n").splitlines():
131 line = line.strip()
132 if not line:
133 continue
134 line = re.sub(r"^[-*+]\s*", "", line)
135 line = re.sub(r"^\d+\.\s*", "", line)
136 cleaned_lines.append(line)
137 return normalize_whitespace(" ".join(cleaned_lines))
138
139
140def cleanup_title(title: str) -> str:

Callers 2

split_known_choiceFunction · 0.85
resolve_descriptionFunction · 0.85

Calls 5

strip_html_commentsFunction · 0.85
normalize_whitespaceFunction · 0.85
replaceMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected