Skip to content

Commit

Permalink
馃悰 FIX: set myst-anchor read/write encoding as utf8 (#610)
Browse files Browse the repository at this point in the history
Ideally it would read from sphinx `source_encoding`,
but this should fix most use cases, with the default encoding.
  • Loading branch information
chrisjsewell committed Aug 15, 2022
1 parent bd9303e commit 363b853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myst_parser/cli.py
Expand Up @@ -13,14 +13,14 @@ def print_anchors(args=None):
arg_parser.add_argument(
"input",
nargs="?",
type=argparse.FileType("r"),
type=argparse.FileType("r", encoding="utf8"),
default=sys.stdin,
help="Input file (default stdin)",
)
arg_parser.add_argument(
"-o",
"--output",
type=argparse.FileType("w"),
type=argparse.FileType("w", encoding="utf8"),
default=sys.stdout,
help="Output file (default stdout)",
)
Expand Down

0 comments on commit 363b853

Please sign in to comment.