diff --git a/misc/templates/reference/module.cshtml b/misc/templates/reference/module.cshtml index efbbe43c9..16f723c2f 100644 --- a/misc/templates/reference/module.cshtml +++ b/misc/templates/reference/module.cshtml @@ -19,10 +19,10 @@ var byCategory = members .GroupBy(m => m.Category) .OrderBy(g => String.IsNullOrEmpty(g.Key) ? "ZZZ" : g.Key) - .Select((g, n) => new { - Index = n, - GroupKey = g.Key, - Members = g.OrderBy(m => m.Name), + .Select((g, n) => new { + Index = n, + GroupKey = g.Key, + Members = g.OrderBy(m => m.Name), Name = String.IsNullOrEmpty(g.Key) ? "Other module members" : g.Key }); @@ -33,23 +33,23 @@

@Model.Module.Name

- Namespace: @Model.Namespace.Name
+ Namespace: @Model.Namespace.Name
@if(Model.ParentModule.Exists()) { - Parent Module: @Model.ParentModule.Value.Name + Parent Module: @Model.ParentModule.Value.Name }

@foreach (var sec in comment.Sections) { // XML comment for the type has multiple sections that can be labelled - // with categories (to give comment for an individual category). Here, + // with categories (to give comment for an individual category). Here, // we print only those that belong to the section. if (!byCategory.Any(g => g.GroupKey == sec.Key)) { if (sec.Key != "") {

@sec.Key

} - @sec.Value + @sec.Value } }
@@ -60,7 +60,7 @@ } @@ -84,7 +84,7 @@ // that is related to this specific category. if (byCategory.Count() > 1) { -

@g.Name 

+

@g.Name 

var info = comment.Sections.FirstOrDefault(kvp => kvp.Key == g.GroupKey); if (info.Key != null) { @@ -94,21 +94,21 @@ } } - @RenderPart("part-members", new { + @RenderPart("part-members", new { Header = "Functions and values", TableHeader = "Function or value", Members = g.Members.Where(m => m.Kind == MemberKind.ValueOrFunction) }) - @RenderPart("part-members", new { + @RenderPart("part-members", new { Header = "Type extensions", TableHeader = "Type extension", Members = g.Members.Where(m => m.Kind == MemberKind.TypeExtension) }) - @RenderPart("part-members", new { + @RenderPart("part-members", new { Header = "Active patterns", TableHeader = "Active pattern", Members = g.Members.Where(m => m.Kind == MemberKind.ActivePattern) }) -} \ No newline at end of file +} diff --git a/misc/templates/reference/type.cshtml b/misc/templates/reference/type.cshtml index 5c32cad74..afc00ca61 100644 --- a/misc/templates/reference/type.cshtml +++ b/misc/templates/reference/type.cshtml @@ -8,7 +8,7 @@ // Get all the members & comment for the type var members = (IEnumerable)Model.Type.AllMembers; var comment = (Comment)Model.Type.Comment; - + // Group all members by their category which is an inline annotation // that can be added to members using special XML comment: // @@ -19,26 +19,26 @@ var byCategory = members .GroupBy(m => m.Category) .OrderBy(g => String.IsNullOrEmpty(g.Key) ? "ZZZ" : g.Key) - .Select((g, n) => new { - Index = n, - GroupKey = g.Key, - Members = g.OrderBy(m => m.Kind == MemberKind.StaticParameter ? "" : m.Name), - Name = String.IsNullOrEmpty(g.Key) ? "Other type members" : g.Key + .Select((g, n) => new { + Index = n, + GroupKey = g.Key, + Members = g.OrderBy(m => m.Kind == MemberKind.StaticParameter ? "" : m.Name), + Name = String.IsNullOrEmpty(g.Key) ? "Other type members" : g.Key }); }

@Model.Type.Name

- Namespace: @Model.Namespace.Name
+ Namespace: @Model.Namespace.Name
@if(Model.HasParentModule) { - Parent Module: @Model.ParentModule.Value.Name + Parent Module: @Model.ParentModule.Value.Name }

@foreach (var sec in comment.Sections) { // XML comment for the type has multiple sections that can be labelled - // with categories (to give comment for an individual category). Here, + // with categories (to give comment for an individual category). Here, // we print only those that belong to the section. if (!byCategory.Any(g => g.GroupKey == sec.Key)) { if (sec.Key != "") { @@ -84,7 +84,7 @@ TableHeader = "Record Field", Members = g.Members.Where(m => m.Kind == MemberKind.RecordField) }) - + @RenderPart("part-members", new { Header = "Static parameters", TableHeader = "Static parameters", diff --git a/tests/FSharp.MetadataFormat.Tests/Tests.fs b/tests/FSharp.MetadataFormat.Tests/Tests.fs index 343ee70d3..3c6406d80 100644 --- a/tests/FSharp.MetadataFormat.Tests/Tests.fs +++ b/tests/FSharp.MetadataFormat.Tests/Tests.fs @@ -400,11 +400,11 @@ let ``MetadataFormat generates module link in nested types``() = let files = dict [ for f in fileNames -> Path.GetFileName(f), File.ReadAllText(f) ] // Check that the modules and type files have namespace information - files.["fslib-class.html"] |> should contain "Namespace: FsLib" - files.["fslib-nested.html"] |> should contain "Namespace: FsLib" - files.["fslib-nested-nestedtype.html"] |> should contain "Namespace: FsLib" - files.["fslib-nested-submodule.html"] |> should contain "Namespace: FsLib" - files.["fslib-nested-submodule-verynestedtype.html"] |> should contain "Namespace: FsLib" + files.["fslib-class.html"] |> should contain "Namespace: FsLib" + files.["fslib-nested.html"] |> should contain "Namespace: FsLib" + files.["fslib-nested-nestedtype.html"] |> should contain "Namespace: FsLib" + files.["fslib-nested-submodule.html"] |> should contain "Namespace: FsLib" + files.["fslib-nested-submodule-verynestedtype.html"] |> should contain "Namespace: FsLib" // Check that the link to the module is correctly generated files.["fslib-nested-nestedtype.html"] |> should contain "Parent Module:"