@@ -895,21 +895,24 @@ private bool CiteOptionsValidator(int fragmentIndex, string fragmentText)
895895 string textWithinBraces = fragmentText . Substring ( 1 , fragmentText . Length - 2 ) ;
896896
897897 // Doxygen always uses a comma to separate the options, ignores whitespace and compares case-insensitively.
898- var options = textWithinBraces . Split ( ',' ) . Select ( o => o . Trim ( ) . ToLower ( CultureInfo . InvariantCulture ) ) ;
898+ var options = textWithinBraces . Split ( ',' ) . Select ( o => o . Trim ( ) ) ;
899899
900900 bool foundMutuallyExclusiveOption = false ;
901901 foreach ( string option in options ) {
902902 if ( option . Length == 0 ) {
903903 continue ; // Doxygen silently ignores empty entries.
904904 }
905905 // https://www.doxygen.nl/manual/commands.html#cmdcite
906- if ( option == "number" || option == "shortauthor" || option == "year" ) {
906+ if ( option . Equals ( "number" , StringComparison . OrdinalIgnoreCase )
907+ || option . Equals ( "shortauthor" , StringComparison . OrdinalIgnoreCase )
908+ || option . Equals ( "year" , StringComparison . OrdinalIgnoreCase ) ) {
907909 if ( foundMutuallyExclusiveOption ) {
908910 return false ; // No syntax highlighting if multiple mutually exclusive options are found.
909911 }
910912 foundMutuallyExclusiveOption = true ;
911913 }
912- else if ( option != "nopar" && option != "nocite" ) {
914+ else if ( ! option . Equals ( "nopar" , StringComparison . OrdinalIgnoreCase )
915+ && ! option . Equals ( "nocite" , StringComparison . OrdinalIgnoreCase ) ) {
913916 // Don't provide syntax highlighting for unknown options, even though Doxygen ignores them,
914917 // so that the user realizes the mistake.
915918 return false ;
@@ -988,7 +991,7 @@ private int FindNextBacktickFragmentEnd(string text, int startMarkerStartIdx, in
988991 int startMarkerLength = startMarkerEndIdx - startMarkerStartIdx ;
989992 Debug . Assert ( startMarkerLength > 0 ) ;
990993 string endMarkerStr = new string ( '`' , startMarkerLength ) ;
991- int endMarkerStartIdx = text . IndexOf ( endMarkerStr , startMarkerEndIdx , StringComparison . InvariantCulture ) ;
994+ int endMarkerStartIdx = text . IndexOf ( endMarkerStr , startMarkerEndIdx , StringComparison . Ordinal ) ;
992995 if ( endMarkerStartIdx < 0 ) {
993996 return - 1 ;
994997 }
0 commit comments