mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 12:27:13 +01:00
fix path on windows escape (#1573)
This commit is contained in:
parent
422f0ad7a9
commit
b17e0c298e
@ -339,7 +339,8 @@ class DocumentLocation:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def as_line_directive(self):
|
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:
|
class DocumentRange:
|
||||||
|
Loading…
Reference in New Issue
Block a user