mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +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
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue