fix path on windows escape (#1573)

This commit is contained in:
Guillermo Ruffino 2021-03-01 22:16:36 -03:00 committed by GitHub
parent 422f0ad7a9
commit b17e0c298e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -339,7 +339,8 @@ class DocumentLocation:
@property
def as_line_directive(self):
return f'#line {self.line + 1} "{self.document}"'
document_path = str(self.document).replace('\\', '\\\\')
return f'#line {self.line + 1} "{document_path}"'
class DocumentRange: