Skip to content

Commit 8229ee6

Browse files
committed
Add default fields to function arguments (Fixes #22)
1 parent 6238746 commit 8229ee6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

generator/scrape.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ def parse_generic_func(self, item, item_def):
226226
link = page.text_content().strip()
227227
if link.startswith("Enums/"):
228228
arg_def["ENUM"] = link[len("Enums/"):]
229-
229+
230+
if "default" in arg.attrib and len(arg.attrib["default"]) > 0:
231+
arg_def["DEFAULT"] = arg.attrib["default"]
232+
230233
self.add_item_content_def(arg, arg_def)
231234

232235
if arg_def["TYPE"] == "function" and "DESCRIPTION" in arg_def:

resources/wiki.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)