Replace whitespace with the original whitespace characters in `s`
(s, tag_s)
| 716 | |
| 717 | |
| 718 | def _keep_original_ws(s, tag_s): |
| 719 | """Replace whitespace with the original whitespace characters in `s`""" |
| 720 | return ''.join( |
| 721 | c if tag_c == " " and c.isspace() else tag_c |
| 722 | for c, tag_c in zip(s, tag_s) |
| 723 | ) |
| 724 | |
| 725 | |
| 726 |