Otherwise the link doesn't get highlighted even though the route matches (routing is case insensitive).
This commit is contained in:
parent
cad6e06a83
commit
efc2f024f3
|
|
@ -175,7 +175,7 @@ namespace Microsoft.AspNetCore.Components.Routing
|
|||
var prefixLength = prefix.Length;
|
||||
if (value.Length > prefixLength)
|
||||
{
|
||||
return value.StartsWith(prefix, StringComparison.Ordinal)
|
||||
return value.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)
|
||||
&& (
|
||||
// Only match when there's a separator character either at the end of the
|
||||
// prefix or right after it.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<li><NavLink href="/subdir/Default.html">With extension</NavLink></li>
|
||||
<li><NavLink href="/subdir/Other">Other</NavLink></li>
|
||||
<li><NavLink href="Other" Match=NavLinkMatch.All>Other with base-relative URL (matches all)</NavLink></li>
|
||||
<li><NavLink href="/subdir/Other?abc=123">Other with query</NavLink></li>
|
||||
<li><NavLink href="/subdir/other?abc=123">Other with query</NavLink></li>
|
||||
<li><NavLink href="/subdir/Other#blah">Other with hash</NavLink></li>
|
||||
<li><NavLink href="/subdir/WithParameters/Name/Abc">With parameters</NavLink></li>
|
||||
<li><NavLink href="/subdir/WithParameters/Name/Abc/LastName/McDef">With more parameters</NavLink></li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue