Skip to content

Commit

Permalink
Fix check links
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Nov 8, 2023
1 parent 0e630aa commit 50de4db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion monitoring/uss_qualifier/scenarios/documentation/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 50de4db

Please sign in to comment.