From e2996d9b381f86b8d05a3bfdc228941be10fff19 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 15 Jan 2020 15:00:30 -0800 Subject: [PATCH] Don't output HTML anchors for non-unique labels We're generating names that nothing links to. The names aren't guaranteed unique, so they're of dubious value anyway. Also, fixed the Atari 2600 visualizer script filename in sys defs. --- SourceGen/Exporter.cs | 11 +++++++++-- SourceGen/RuntimeData/SystemDefs.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/SourceGen/Exporter.cs b/SourceGen/Exporter.cs index 6850518..3979997 100644 --- a/SourceGen/Exporter.cs +++ b/SourceGen/Exporter.cs @@ -602,8 +602,15 @@ namespace SourceGen { line.LineType == LineListGen.Line.Type.Data || line.LineType == LineListGen.Line.Type.EquDirective) && !string.IsNullOrEmpty(parts.Label)) { - anchorLabel = "" + parts.Label + ""; + if (parts.Label.StartsWith(mFormatter.NonUniqueLabelPrefix)) { + // TODO(someday): handle non-unique labels. ':' is valid in HTML anchors, + // so we can use that to distinguish them from other labels, but we still + // 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 = "" + parts.Label + ""; + } } // If needed, create an HTML link for the operand field. diff --git a/SourceGen/RuntimeData/SystemDefs.json b/SourceGen/RuntimeData/SystemDefs.json index e3b766c..b20eafa 100644 --- a/SourceGen/RuntimeData/SystemDefs.json +++ b/SourceGen/RuntimeData/SystemDefs.json @@ -137,7 +137,7 @@ "RT:Atari/2600.sym65" ], "ExtensionScripts" : [ - "RT:Atari/VisAtari2600.cs" + "RT:Atari/Vis2600.cs" ], "Parameters" : { "load-address":"0xf000"