From d29d2eab24d55a7d21bf234ae83fff7ef8b64529 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Fri, 17 Nov 2023 23:42:39 +0100 Subject: [PATCH] feat(scraper): ignore subfields in function parameters --- src/awesomewmdtl/scraper/module_doc.tl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/awesomewmdtl/scraper/module_doc.tl b/src/awesomewmdtl/scraper/module_doc.tl index 97b57f7..f3c2934 100644 --- a/src/awesomewmdtl/scraper/module_doc.tl +++ b/src/awesomewmdtl/scraper/module_doc.tl @@ -54,6 +54,12 @@ local function extract_function_parameters(table_html: string, function_name: st local name = extract_node_text(name_node) local types = parse_parameter_types(extract_node_text(types_node)) + -- If the name contains a dot, then it's a nested field in a table + -- We don't support this yet, so we just ignore it + if name:match("%.") then + return nil + end + -- Add a field to the current parameter type record if tr.attr ~= nil and tr.attr.class == "see_also_sublist" and is_populating_parameters_types then local field = ast.create_node("variable", name)