Changeset 8398


Ignore:
Timestamp:
Sep 28, 2019, 5:39:32 PM (2 years ago)
Author:
Sven Rech
Message:

Made Online Help generation more robust, because it does crash currently due to a new template file with empty name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/OnlineDocumentationGenerator/Generators/HtmlGenerator/HtmlGenerator.cs

    r8109 r8398  
    133133            AllTemplatesList.Clear();
    134134            WalkTemplateDirectory2(_templatesDir);
    135             var groups = AllTemplatesList.OrderBy(t => t.CurrentLocalization.Name).GroupBy(t => t.CurrentLocalization.Name[0]);
     135            var groups = AllTemplatesList
     136                .Where(t => !string.IsNullOrWhiteSpace(t.CurrentLocalization.Name))
     137                .OrderBy(t => t.CurrentLocalization.Name)
     138                .GroupBy(t => t.CurrentLocalization.Name[0]);
    136139
    137140            var anchor = "<p>" + String.Concat(groups.Select(g => string.Format("<a href=\"#{0}\"><b>{0}</b></a>&nbsp;\n", g.Key))) + "</p>";
Note: See TracChangeset for help on using the changeset viewer.