Skip to content

Commit f21e0d3

Browse files
committed
Merge pull request python-mode#625 from Pitmairen/patch-1
Make encoding regexp less strict
2 parents 8ce662a + 1e2d9a2 commit f21e0d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymode/libs3/rope/base/fscommands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def read_str_coding(source):
242242
if not isinstance(source, str):
243243
source = source.decode("utf-8", "ignore")
244244
#TODO: change it to precompiled version
245-
mex = re.search("\-\*\-\s+coding:\s+(.*?)\s+\-\*\-", source)
245+
mex = re.search("\-\*\-\s+coding:\s*(.*?)\s+\-\*\-", source)
246246
if mex:
247247
return mex.group(1)
248248
return "utf-8"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy