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) {