MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / clean_title

Method clean_title

scripts/migrate_posts.py:144–149  ·  view source on GitHub ↗
(self, title_raw: str)

Source from the content-addressed store, hash-verified

142 return md.strip()
143
144 def clean_title(self, title_raw: str) -> str:
145 t = re.sub(r"<[^>]+>", "", title_raw)
146 t = t.replace("&amp;", "&").replace("&#8211;", "-")
147 t = t.replace("&#038;", "&").replace("&hellip;", "...")
148 t = t.replace("&#8212;", "--").replace("&nbsp;", " ")
149 return t.strip()
150
151 def slugify(self, text: str) -> str:
152 text = text.lower()

Callers 3

save_postMethod · 0.95
list_postsMethod · 0.95
migrateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected