mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Update parser.py
encoding damages non-ASCII characters
This commit is contained in:
parent
1044ac4ac1
commit
4148207756
@ -479,7 +479,7 @@ class Parser:
|
||||
|
||||
def parse_comments(self) -> None:
|
||||
"""Parse the code and pick up comments."""
|
||||
tree = ast.parse(self.code.encode())
|
||||
tree = ast.parse(self.code)
|
||||
picker = VariableCommentPicker(self.code.splitlines(True), self.encoding)
|
||||
picker.visit(tree)
|
||||
self.comments = picker.comments
|
||||
|
Loading…
Reference in New Issue
Block a user