Show More
@@ -2211,6 +2211,13 b' def tolf(s):' | |||||
2211 | def tocrlf(s): |
|
2211 | def tocrlf(s): | |
2212 | return _eolre.sub('\r\n', s) |
|
2212 | return _eolre.sub('\r\n', s) | |
2213 |
|
2213 | |||
|
2214 | if pycompat.oslinesep == '\r\n': | |||
|
2215 | tonativeeol = tocrlf | |||
|
2216 | fromnativeeol = tolf | |||
|
2217 | else: | |||
|
2218 | tonativeeol = pycompat.identity | |||
|
2219 | fromnativeeol = pycompat.identity | |||
|
2220 | ||||
2214 | def escapestr(s): |
|
2221 | def escapestr(s): | |
2215 | # call underlying function of s.encode('string_escape') directly for |
|
2222 | # call underlying function of s.encode('string_escape') directly for | |
2216 | # Python 3 compatibility |
|
2223 | # Python 3 compatibility |
General Comments 0
You need to be logged in to leave comments.
Login now