mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
improve title capitalization utility method (IDEA-296630)
for the "Incorrect string capitalization" inspection GitOrigin-RevId: 26358913496d218e21a071c3f0b1058ea3f45ca2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
539cd38b54
commit
9c47f6dd89
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -13,7 +13,6 @@ public class NlsCapitalizationUtil {
|
||||
if (StringUtil.isEmpty(value) || capitalization == Nls.Capitalization.NotSpecified) {
|
||||
return true;
|
||||
}
|
||||
value = value.replace("&", "");
|
||||
return capitalization == Nls.Capitalization.Title
|
||||
? StringUtil.wordsToBeginFromUpperCase(value).equals(value)
|
||||
: checkSentenceCapitalization(value);
|
||||
|
||||
Reference in New Issue
Block a user