Truncate a post body at the first non-author section (archived comments / discussion footer), returning only the author's own prose.
(body)
| 57 | |
| 58 | |
| 59 | def 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 | |
| 66 | def strip_shortcodes(text): |
no test coverage detected