mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-10715 comment with line/block comment does not work when in regex literal
This commit is contained in:
+2
-2
@@ -74,9 +74,9 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
|
||||
PsiElement context = InjectedLanguageManager.getInstance(file.getProject()).getInjectionHost(file);
|
||||
|
||||
if (context != null && (context.textContains('\'') || context.textContains('\"'))) {
|
||||
if (context != null && (context.textContains('\'') || context.textContains('\"') || context.textContains('/'))) {
|
||||
String s = context.getText();
|
||||
if (StringUtil.startsWith(s, "\"") || StringUtil.startsWith(s, "\'")) {
|
||||
if (StringUtil.startsWith(s, "\"") || StringUtil.startsWith(s, "\'") || StringUtil.startsWith(s, "/")) {
|
||||
file = context.getContainingFile();
|
||||
editor = editor instanceof EditorWindow ? ((EditorWindow)editor).getDelegate() : editor;
|
||||
caret = caret instanceof InjectedCaret ? ((InjectedCaret)caret).getDelegate() : caret;
|
||||
|
||||
Reference in New Issue
Block a user