mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make string contents nongreedy.
This commit is contained in:
parent
98b6073a7e
commit
3002eb391f
@ -208,6 +208,6 @@ def write_file(name, contents, encoding=None):
|
||||
def sprint(*args):
|
||||
sys.stderr.write(' '.join(map(str, args)) + '\n')
|
||||
|
||||
_unicode_literals_re = re.compile(r'u(".*")|u(\'.*\')')
|
||||
_unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')')
|
||||
def remove_unicode_literals(s):
|
||||
return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s)
|
||||
|
Loading…
Reference in New Issue
Block a user