From 50de4dbe14090015459ad9d2d5db6a5a06e99397 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Wed, 8 Nov 2023 06:50:15 +0000 Subject: [PATCH] Fix check links --- .../uss_qualifier/scenarios/documentation/parsing.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/monitoring/uss_qualifier/scenarios/documentation/parsing.py b/monitoring/uss_qualifier/scenarios/documentation/parsing.py index d90ad2cb1e..7975e576d6 100644 --- a/monitoring/uss_qualifier/scenarios/documentation/parsing.py +++ b/monitoring/uss_qualifier/scenarios/documentation/parsing.py @@ -193,7 +193,12 @@ def _get_anchors( anchors = {} if isinstance(value, marko.block.Heading): - base_anchor = "#" + text_of(value).lower().replace(" ", "-") + heading_text = text_of(value) + for s in Severity: + if heading_text.startswith(s.symbol): + heading_text = heading_text[len(s.symbol) :].lstrip() + break + base_anchor = "#" + heading_text.lower().replace(" ", "-") if base_anchor not in header_counts: anchors[value] = base_anchor else: