Closed
Description
Link calculation in Dartdoc currently makes #739 and #1343 somewhat challenging. There's no way to tell currently if dartdoc is calling href in a context where we know we should expect to have something to link (#1343). In addition, because of the way link calculation is handled, there's no easy way to insert alternate handling when we want to link externally (#739).
- Change href string assembly to be the responsibility of the individual element, and have href for non-canonical elements forward that on to the canonical element. This will help link to identifiers in sdk on api.dartlang.org from third-party package #739 by providing a clear place to insert the link generation.
- Audit all uses of href and extract returns without links into an expression that explicitly checks whether we should be linking where appropriate to make Not all links get cross-referenced #1343 possible.