Open mikernet opened 3 weeks ago
It seems to be occurred when using "outputFormat": "mref"
options.
When using apiPage
or markdown
options. It works as expected.
I though it's introduced by enabling InvariantGlobalization
mode. (#8893)
I'll try to create PR to fix reported issue later.
Background
Currently toc items are sorted by uid
.
And when item contains generic type parameter
it's represented as "`1".
But when toc items are sorted with Ordinal
order.
The order of results is changed from what is expected.
Sample TOC file
- uid: BuildFromProject.IRoutedView
name: IRoutedView
- uid: BuildFromProject.IRoutedViewModel
name: IRoutedViewModel
- uid: BuildFromProject.IRoutedView`1
name: IRoutedView<T>
So based on your comment, does that mean that there is a workaround that I can use for now (something that won't radically change how I need to generate the docs)?
A temporary workaround is to disable globalization nvariant mode.
1. Steps to disableInvariantMode
settings
%UserProfile%\.dotnet\tools\.store\docfx\2.77.0\docfx\2.77.0\tools\net8.0\any\docfx.runtimeconfig.json
System.Globalization.Invariant
setting to false
.2. Steps to confirm behavior changes
docfx metadata
command.docfx build --serve
commandTo fix the root cause problems.
It need to create Custom IComparer<string>
that compatible with InvariantCulture
(with System.Globalization.Invariant: false
)
Describe the bug Title says it all. Examples:
Expected behavior Generic types/methods should follow immediately after non-generic ones with the same name.
Context (please complete the following information):