From 145cd94405ef06f2afcfa1c855e47f9c7b6f15e9 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 28 Aug 2024 11:04:44 -0700 Subject: [PATCH] Fix referrable information on broken link messages. This fixes https://github.com/dart-lang/dartdoc/issues/3604 --- lib/src/model/package_graph.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/model/package_graph.dart b/lib/src/model/package_graph.dart index 93d1897e8c..5d67e3b68a 100644 --- a/lib/src/model/package_graph.dart +++ b/lib/src/model/package_graph.dart @@ -605,6 +605,9 @@ class PackageGraph with CommentReferable, Nameable { if (href == null) continue; hrefMap.putIfAbsent(href, () => {}).add(modelElement); + hrefMap + .putIfAbsent(href.replaceAll(htmlBasePlaceholder, ''), () => {}) + .add(modelElement); } for (final library in _allLibraries.values) {