mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix a small problem with rfind() methods.
This commit is contained in:
parent
1127319ca5
commit
b966975ca6
@ -534,7 +534,7 @@ class BuildEnvironment:
|
||||
"""
|
||||
Custom decoding error handler that warns and replaces.
|
||||
"""
|
||||
linestart = error.object.rfind('\n', None, error.start)
|
||||
linestart = error.object.rfind('\n', 0, error.start)
|
||||
lineend = error.object.find('\n', error.start)
|
||||
if lineend == -1: lineend = len(error.object)
|
||||
lineno = error.object.count('\n', 0, error.start) + 1
|
||||
|
Loading…
Reference in New Issue
Block a user