Skip to content

Commit

Permalink
Fix encoding issues with {exec} :include: on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
rblank committed Sep 12, 2024
1 parent 364616d commit ea55376
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tdoc/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def run(self):
for path in include.split():
rel_path, path = self.env.relfn2path(path)
self.env.note_dependency(rel_path)
text = pathlib.Path(path).read_text(self.config.source_encoding)
content.extend(statemachine.StringList(
initlist=pathlib.Path(path).read_text().splitlines(),
initlist=text.splitlines(),
source=path))
self.content[:0] = content
res = super().run()
Expand Down

0 comments on commit ea55376

Please sign in to comment.