mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
escape copyright keyword to use in regexp (IDEA-135402)
This commit is contained in:
@@ -120,7 +120,7 @@ public abstract class UpdatePsiFileCopyright extends AbstractUpdateCopyright {
|
||||
final LinkedHashSet<CommentRange> found = new LinkedHashSet<CommentRange>();
|
||||
Document doc = null;
|
||||
if (!StringUtil.isEmpty(keyword)) {
|
||||
Pattern pattern = Pattern.compile(keyword, Pattern.CASE_INSENSITIVE);
|
||||
Pattern pattern = Pattern.compile(StringUtil.escapeToRegexp(keyword), Pattern.CASE_INSENSITIVE);
|
||||
doc = FileDocumentManager.getInstance().getDocument(getFile().getVirtualFile());
|
||||
for (int i = 0; i < comments.size(); i++) {
|
||||
PsiComment comment = comments.get(i);
|
||||
|
||||
Reference in New Issue
Block a user