去掉文本末尾的 `^x-...` 锚点(用于生成 preview / 重生成时识别原标题)。
(s: str)
| 215 | |
| 216 | |
| 217 | def _strip_anchor_from_text(s: str) -> str: |
| 218 | """去掉文本末尾的 `^x-...` 锚点(用于生成 preview / 重生成时识别原标题)。""" |
| 219 | return ANCHOR_TAIL_RE.sub("", s).rstrip() |
| 220 | |
| 221 | |
| 222 | def _clean_preview(text: str) -> str: |