NNBD preview: Link to spans rather than anchors

Fixes https://github.com/dart-lang/sdk/issues/39374

Change-Id: Ifcde796822a5c58608f5432874d70b0a17d69217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
Sam Rawlins 2019-11-13 19:42:44 +00:00 committed by commit-bot@chromium.org
parent df2093362d
commit 858265d0b4

View file

@ -269,12 +269,12 @@ class InstrumentationRenderer {
if (regionLength > 0) {
int openOffset = mapper.map(region.offset);
String openInsertion = openInsertions[openOffset] ?? '';
openInsertion = '<a id="o${region.offset}">$openInsertion';
openInsertion = '<span id="o${region.offset}">$openInsertion';
openInsertions[openOffset] = openInsertion;
int closeOffset = openOffset + regionLength;
String closeInsertion = closeInsertions[closeOffset] ?? '';
closeInsertion = '$closeInsertion</a>';
closeInsertion = '$closeInsertion</span>';
closeInsertions[closeOffset] = closeInsertion;
}
}