diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/podman/markdown-utf8.diff')
-rw-r--r-- | var/spack/repos/builtin/packages/podman/markdown-utf8.diff | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/podman/markdown-utf8.diff b/var/spack/repos/builtin/packages/podman/markdown-utf8.diff new file mode 100644 index 0000000000..8c7c5f881f --- /dev/null +++ b/var/spack/repos/builtin/packages/podman/markdown-utf8.diff @@ -0,0 +1,20 @@ +--- a/hack/markdown-preprocess ++++ b/hack/markdown-preprocess +@@ -36,7 +36,7 @@ + outfile = os.path.splitext(infile)[0] + outfile_tmp = outfile + '.tmp.' + str(os.getpid()) + +- with open(infile, 'r') as fh_in, open(outfile_tmp, 'w') as fh_out: ++ with open(infile, 'r', encoding='utf-8') as fh_in, open(outfile_tmp, 'w', encoding='utf-8') as fh_out: + for line in fh_in: + # '@@option foo' -> include file options/foo.md + if line.startswith('@@option '): +@@ -63,7 +63,7 @@ + # treats them as one line and will unwantedly render the + # comment in its output. + fh_out.write("\n[//]: # (BEGIN included file " + path + ")\n") +- with open(path, 'r') as fh_included: ++ with open(path, 'r', encoding='utf-8') as fh_included: + for opt_line in fh_included: + opt_line = self.replace_type(opt_line) + opt_line = opt_line.replace('<<subcommand>>', self.podman_subcommand()) |