mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-160102 JavaScript Debugger: "Copy Watch"creates buggy code
This commit is contained in:
@@ -59,20 +59,20 @@ object ValueModifierUtil {
|
||||
}
|
||||
|
||||
private fun doAppendName(builder: StringBuilder, name: String, quoted: Boolean) {
|
||||
val useKeyNotation = !quoted && KEY_NOTATION_PROPERTY_NAME_PATTERN.matcher(name).matches()
|
||||
if (builder.length != 0) {
|
||||
builder.append(if (useKeyNotation) '.' else '[')
|
||||
}
|
||||
if (useKeyNotation) {
|
||||
builder.append(name)
|
||||
}
|
||||
else {
|
||||
if (quoted) {
|
||||
builder.append(name)
|
||||
val isProperty = !builder.isEmpty()
|
||||
if (isProperty) {
|
||||
val useKeyNotation = !quoted && KEY_NOTATION_PROPERTY_NAME_PATTERN.matcher(name).matches()
|
||||
if (useKeyNotation) {
|
||||
builder.append('.').append(name)
|
||||
}
|
||||
else {
|
||||
JsonUtil.escape(name, builder)
|
||||
builder.append('[')
|
||||
if (quoted) builder.append(name)
|
||||
else JsonUtil.escape(name, builder)
|
||||
builder.append(']')
|
||||
}
|
||||
builder.append(']')
|
||||
}
|
||||
else {
|
||||
builder.append(name)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user