mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
bugdown: Parse argument JSON files as streams.
This commit is contained in:
committed by
Tim Abbott
parent
f81b936727
commit
f9f8d9c578
@@ -44,7 +44,7 @@ class APIArgumentsTablePreprocessor(Preprocessor):
|
|||||||
json_filename = os.path.normpath(os.path.join(self.base_path, json_filename))
|
json_filename = os.path.normpath(os.path.join(self.base_path, json_filename))
|
||||||
try:
|
try:
|
||||||
with open(json_filename, 'r') as fp:
|
with open(json_filename, 'r') as fp:
|
||||||
json_obj = ujson.loads(fp.read())
|
json_obj = ujson.load(fp)
|
||||||
arguments = json_obj[doc_filename]
|
arguments = json_obj[doc_filename]
|
||||||
text = self.render_table(arguments)
|
text = self.render_table(arguments)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user