Skip to content

Commit d9ce71a

Browse files
committed
May as well also show quotes in the annotation.
1 parent 1b719a8 commit d9ce71a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bin/annotate-specification-links

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ def main():
8989
specifications = test_case.get("specification")
9090
if specifications is not None:
9191
for each in specifications:
92-
(kind, section), = (
93-
(k, v) for k, v in each.items() if k != "quote"
94-
)
92+
quote = each.pop("quote", "")
93+
(kind, section), = each.items()
9594

9695
number = re.search(r"\d+", kind)
9796
spec = "" if number is None else number.group(0)
@@ -100,12 +99,14 @@ def main():
10099
spec=spec,
101100
section=section,
102101
)
102+
103+
message = f"{url}\n\n{quote}" if quote else url
103104
sys.stdout.write(
104105
annotation(
105106
path=path,
106107
line=line_number_of(path, test_case),
107108
title="Specification Link",
108-
message=url,
109+
message=message,
109110
),
110111
)
111112

0 commit comments

Comments
 (0)