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