r"""Return `s` with \001 and \002 characters removed. If `including_content` is True, content between \001 and \002 is also stripped.
(s: str, including_content: bool = False)
| 86 | |
| 87 | |
| 88 | def unbracket(s: str, including_content: bool = False) -> str: |
| 89 | r"""Return `s` with \001 and \002 characters removed. |
| 90 | |
| 91 | If `including_content` is True, content between \001 and \002 is also |
| 92 | stripped. |
| 93 | """ |
| 94 | if including_content: |
| 95 | return ZERO_WIDTH_BRACKET.sub("", s) |
| 96 | return s.translate(ZERO_WIDTH_TRANS) |
| 97 | |
| 98 | |
| 99 | def gen_colors(buffer: str) -> Iterator[ColorSpan]: |
no test coverage detected
searching dependent graphs…