summaryrefslogtreecommitdiff
path: root/scripts/lib/abi/abi_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/abi/abi_parser.py')
-rw-r--r--scripts/lib/abi/abi_parser.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/scripts/lib/abi/abi_parser.py b/scripts/lib/abi/abi_parser.py
index 6fac461d794c..87d1b9e14bb3 100644
--- a/scripts/lib/abi/abi_parser.py
+++ b/scripts/lib/abi/abi_parser.py
@@ -266,12 +266,20 @@ class AbiParser:
def parse_readme(self, nametag, fname):
"""Parse ABI README file"""
+ nametag["what"] = ["ABI file contents"]
+ nametag["path"] = "README"
with open(fname, "r", encoding="utf8", errors="backslashreplace") as fp:
- nametag["description"] = "```\n"
for line in fp:
- nametag["description"] += " " + line
+ match = self.re_tag.match(line)
+ if match:
+ new = match.group(1).lower()
+
+ match = self.re_valid.search(new)
+ if match:
+ nametag["description"] += "\n:" + line
+ continue
- nametag["description"] += "```\n"
+ nametag["description"] += line
def parse_file(self, fname, path, basename):
"""Parse a single file"""
@@ -459,12 +467,8 @@ class AbiParser:
continue
if filter_path:
- if filter_path == "README":
- if not names[0].endswith("README"):
- continue
- else:
- if v.get("path") != filter_path:
- continue
+ if v.get("path") != filter_path:
+ continue
msg = ""