mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-40089: Fixed bug with possible several internal dots
This commit is contained in:
@@ -25,7 +25,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class YAMLCopyPasteProcessor implements CopyPastePreProcessor {
|
||||
private final static String CONFIG_KEY_SEQUENCE_PATTERN = "([^\\s{}\\[\\]][^\\s]*\\.)+[^\\s{}\\[\\].][^\\s.]*:?\\s*";
|
||||
private final static String CONFIG_KEY_SEQUENCE_PATTERN = "([^\\s{}\\[\\].][^\\s.]*\\.)+[^\\s{}\\[\\].][^\\s.]*:?\\s*";
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
@@ -78,6 +78,11 @@ public class YAMLKeyPasteTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
doTest("some. strange. text");
|
||||
}
|
||||
|
||||
// Ambiguity in dot splitting
|
||||
public void testDoNotPasteKeysWithBadPattern3() {
|
||||
doTest("some.strange..text");
|
||||
}
|
||||
|
||||
public void testDoNotPasteArrayAsKeys() {
|
||||
doTest("[x.y]");
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
top:
|
||||
next: value1
|
||||
key:
|
||||
some.strange..text<caret>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
top:
|
||||
next: value1
|
||||
key:
|
||||
<caret>
|
||||
Reference in New Issue
Block a user