1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-19 21:31:30 +00:00

Tweak HTML output

Changed the HTML template to make the SourceGen version visible,
and added the expression style.
This commit is contained in:
Andy McFadden 2019-09-17 22:14:10 -07:00
parent 3353819a62
commit ab755f1bc1
2 changed files with 12 additions and 3 deletions

View File

@ -366,6 +366,11 @@ namespace SourceGen {
// Perform some quick substitutions.
tmplStr = tmplStr.Replace("$ProjectName$", mProject.DataFileName);
tmplStr = tmplStr.Replace("$AppVersion$", App.ProgramVersion.ToString());
string expModeStr = ((Formatter.FormatConfig.ExpressionMode)
AppSettings.Global.GetEnum(AppSettings.FMT_EXPRESSION_MODE,
typeof(Formatter.FormatConfig.ExpressionMode),
(int)Formatter.FormatConfig.ExpressionMode.Unknown)).ToString();
tmplStr = tmplStr.Replace("$ExpressionStyle$", expModeStr);
// Generate and substitute the symbol table. This should be small enough that
// we won't break the world by doing it with string.Replace().
@ -693,7 +698,7 @@ namespace SourceGen {
sb.Append(" <tr>");
sb.Append("<td><a href=#" + LABEL_LINK_PREFIX + sym.Label + ">" +
sym.Label + "</a></td>");
sb.Append("<td>" + mFormatter.FormatHexValue(sym.Value, 2) + "</td>");
sb.Append("<td><code>" + mFormatter.FormatHexValue(sym.Value, 2) + "</code></td>");
sb.Append("</tr>\r\n");
count++;
}

View File

@ -25,7 +25,11 @@ $CodeLines$
<h2>Symbol Table</h2>
$SymbolTable$
</div>
</body>
<!-- generated by 6502bench SourceGen v$AppVersion$ - https://6502bench.com/ -->
<div id="footer">
<hr/>
<p>HTML generated by <a href="https://6502bench.com/">6502bench SourceGen</a> v$AppVersion$</p>
<p>Expression style: $ExpressionStyle$</p>
</div>
</body>
</html>