You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pypandoc.py
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,15 @@
11
11
12
12
13
13
14
-
defconvert(source, to, format=None, extra_args=()):
14
+
defconvert(source, to, format=None, extra_args=(), encoding='utf-8'):
15
15
'''Converts given `source` from `format` `to` another. `source` may be either a file path or a string to be converted. It's possible to pass `extra_args` if needed. In case `format` is not provided, it will try to invert the format based on given `source`.
16
16
17
17
Raises OSError if pandoc is not found! Make sure it has been installed and is available at path.
18
18
'''
19
-
return_convert(_read_file, _process_file, source, to, format, extra_args)
19
+
return_convert(_read_file, _process_file, source, to, format, extra_args, encoding=encoding)
20
20
21
-
def_convert(reader, processor, source, to, format=None, extra_args=()):
22
-
source, format=reader(source, format)
21
+
def_convert(reader, processor, source, to, format=None, extra_args=(), encoding=None):
22
+
source, format=reader(source, format, encoding=encoding)
0 commit comments