From 372df36b24be9d308f8232ab8b745a2b9aec8e65 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Sun, 1 Jun 2025 11:11:09 -0700 Subject: [PATCH] permit sref links to individual paragraphs currently an sref like `[exec.continues.on#5]{.sref}` correctly generates a link to p5 of `[exec.continues.on]`, but will generate a warning: ``` mpark/wg21: stable name exec.continues.on#5 not found ``` and then fail to include the subsection number. this PR fixes that. --- data/filters/wg21.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/filters/wg21.py b/data/filters/wg21.py index 9445374..ac2294d 100755 --- a/data/filters/wg21.py +++ b/data/filters/wg21.py @@ -365,7 +365,7 @@ def rm(): _diff('rmcolor', 'sout', 'del') if 'sref' in elem.classes and isinstance(elem, pf.Span): target = pf.stringify(elem) - number = stable_names.get(target) + number = stable_names.get(target.split('#')[0]) link = pf.Link( pf.Str(f'[{target}]'), url=f'https://wg21.link/{target}')