diff --git a/SourceGen/Exporter.cs b/SourceGen/Exporter.cs index 0558f95..67d61d3 100644 --- a/SourceGen/Exporter.cs +++ b/SourceGen/Exporter.cs @@ -386,7 +386,8 @@ namespace SourceGen { return; } - // Perform some quick substitutions. + // Perform some quick substitutions. This could be done more efficiently, + // but we're only doing this on the template file, which should be small. tmplStr = tmplStr.Replace("$ProjectName$", mProject.DataFileName); tmplStr = tmplStr.Replace("$AppVersion$", App.ProgramVersion.ToString()); string expModeStr = ((Formatter.FormatConfig.ExpressionMode) @@ -394,6 +395,10 @@ namespace SourceGen { typeof(Formatter.FormatConfig.ExpressionMode), (int)Formatter.FormatConfig.ExpressionMode.Unknown)).ToString(); tmplStr = tmplStr.Replace("$ExpressionStyle$", expModeStr); + string dateStr = DateTime.Now.ToString("yyyy/MM/dd"); + string timeStr = DateTime.Now.ToString("HH:mm:ss zzz"); + tmplStr = tmplStr.Replace("$CurrentDate$", dateStr); + tmplStr = tmplStr.Replace("$CurrentTime$", timeStr); // Generate and substitute the symbol table. This should be small enough that // we won't break the world by doing it with string.Replace(). @@ -411,7 +416,6 @@ namespace SourceGen { string template1 = tmplStr.Substring(0, splitPoint); string template2 = tmplStr.Substring(splitPoint + CodeLinesStr.Length); - // Generate UTF-8 text, without a byte-order mark. using (StreamWriter sw = new StreamWriter(pathName, false, new UTF8Encoding(false))) { sw.Write(template1); diff --git a/SourceGen/RuntimeData/ExportTemplate.html b/SourceGen/RuntimeData/ExportTemplate.html index 3d0ac38..44cef74 100644 --- a/SourceGen/RuntimeData/ExportTemplate.html +++ b/SourceGen/RuntimeData/ExportTemplate.html @@ -28,7 +28,8 @@ $SymbolTable$ diff --git a/SourceGen/RuntimeData/SGStyle.css b/SourceGen/RuntimeData/SGStyle.css index 489ff5c..e75b426 100644 --- a/SourceGen/RuntimeData/SGStyle.css +++ b/SourceGen/RuntimeData/SGStyle.css @@ -11,3 +11,16 @@ table, th, td { border: 1px solid black; border-collapse: collapse; } + +/* + * Blue underlined text is distracting. Change internal links to be + * plain black text until they're hovered over. + */ +a[href^="#"]:link, a[href^="#"]:visited { + color: black; + text-decoration: none; +} +a[href^="#"]:hover { + color: blue; + text-decoration: underline; +} \ No newline at end of file