Method: difflib._keep_original_ws
Calls: 146, Exceptions: 0, Paths: 1Back
Path 1: 146 calls (1.0)
' 1. Beautiful is beTTer than ugly.' (18) ' 3. Simple is better than complex.' (18) ' 1. Beautiful is better than ugly.' (17) ' 3. Simple is...
' ^^ ' (34) ' ' (18) ' ++ ' (17) ' ^^...
' ^^ ' (34) ' ' (17) ' ++ ' (17) ' ^^...
1def _keep_original_ws(s, tag_s):
2 """Replace whitespace with the original whitespace characters in `s`"""
3 return ''.join(
4 c if tag_c == " " and c.isspace() else tag_c
5 for c, tag_c in zip(s, tag_s)
6 )