mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
fix path on windows escape (#1573)
This commit is contained in:
parent
422f0ad7a9
commit
b17e0c298e
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue