MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / author_body

Function author_body

scripts/website/blog_text.py:59–63  ·  view source on GitHub ↗

Truncate a post body at the first non-author section (archived comments / discussion footer), returning only the author's own prose.

(body)

Source from the content-addressed store, hash-verified

57
58
59def author_body(body):
60 """Truncate a post body at the first non-author section (archived comments
61 / discussion footer), returning only the author's own prose."""
62 m = _NON_AUTHOR_HEADING_RE.search(body)
63 return body[:m.start()] if m else body
64
65
66def strip_shortcodes(text):

Callers 2

body_to_htmlFunction · 0.85

Calls 2

startMethod · 0.65
searchMethod · 0.45

Tested by

no test coverage detected