1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-26 06:49:19 +00:00

Trim annotations off of labels in HTML names

When generating the HTML anchor name element we need to remove the
trailing '?' from the label.  It wasn't present in the hrefs, so all
links to annotated labels were broken.
This commit is contained in:
Andy McFadden 2020-03-18 17:57:07 -07:00
parent 547cbb7811
commit 456f2c8afb

View File

@ -667,7 +667,10 @@ namespace SourceGen {
// need to ensure that the label is unique and all references point to the
// correct instance. We can't get that from the Parts list.
} else {
anchorLabel = "<a name=\"" + LABEL_LINK_PREFIX + parts.Label +
string trimLabel = Symbol.TrimAndValidateLabel(parts.Label,
mFormatter.NonUniqueLabelPrefix, out bool isValid, out bool unused1,
out bool unused2, out bool unused3, out Symbol.LabelAnnotation unusedAnno);
anchorLabel = "<a name=\"" + LABEL_LINK_PREFIX + trimLabel +
"\">" + parts.Label + "</a>";
}
}