fix: look in target if draft name not found in anchor#10636
fix: look in target if draft name not found in anchor#10636jennifer-richards merged 2 commits intoietf-tools:mainfrom
Conversation
|
@larseggert you were here not to long ago - would appreciate your input. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10636 +/- ##
==========================================
- Coverage 88.44% 88.42% -0.02%
==========================================
Files 330 330
Lines 44365 44373 +8
==========================================
+ Hits 39237 39239 +2
- Misses 5128 5134 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| target = ref.get("target") | ||
| if isinstance(target, str): | ||
| target = target.lower() | ||
| if target.startswith("https://datatracker.ietf.org/doc/"): |
There was a problem hiding this comment.
Depending on this not changing is a bit ugly. Can we at least make https://datatracker.ietf.org/ and maybe doc tool-wide constants?
There was a problem hiding this comment.
I agree and would be inclined to split out a helper like targetsDatatrackerDoc() (or some not terrible name. It could probably wait until we see a second use for it, though.
jennifer-richards
left a comment
There was a problem hiding this comment.
Looks like an improvement to me. Could perhaps be refactored, but I don't think it's essential.
| target = ref.get("target") | ||
| if isinstance(target, str): | ||
| target = target.lower() | ||
| if target.startswith("https://datatracker.ietf.org/doc/"): |
There was a problem hiding this comment.
I agree and would be inclined to split out a helper like targetsDatatrackerDoc() (or some not terrible name. It could probably wait until we see a second use for it, though.
|
I guess we should bring this in and go for incremental improvement later - moving it out of draft. |
Fixes #10634