mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 03:27:32 +08:00
Various fixes
This commit is contained in:
@@ -273,7 +273,7 @@ export default class Grammar {
|
||||
).chain(([attributeName, _1]) => this
|
||||
.grammarFor(entityType.attributes[attributeName], undefined)
|
||||
.map(attributeValue =>
|
||||
values => values[attributeName] = attributeValue
|
||||
values => values[Utility.encodeKeyName(attributeName)] = attributeValue
|
||||
))
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ export default class Grammar {
|
||||
let values = {}
|
||||
attributes.forEach(attributeSetter => attributeSetter(values))
|
||||
if (lookbehind.length) {
|
||||
values["lookbehind"] = lookbehind
|
||||
values.lookbehind = lookbehind
|
||||
}
|
||||
return new UnknownKeysEntity(values)
|
||||
})
|
||||
@@ -536,10 +536,10 @@ export default class Grammar {
|
||||
P.regex(/CustomProperties\s+/),
|
||||
this.pinEntity,
|
||||
).map(([_0, pin]) => values => {
|
||||
if (!values["CustomProperties"]) {
|
||||
values["CustomProperties"] = []
|
||||
if (!values.CustomProperties) {
|
||||
values.CustomProperties = []
|
||||
}
|
||||
values["CustomProperties"].push(pin)
|
||||
values.CustomProperties.push(pin)
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class ISerializer {
|
||||
const isSerialized = Utility.isSerialized(entity, fullKey)
|
||||
result += (result.length ? this.attributeSeparator : "")
|
||||
+ this.attributePrefix
|
||||
+ this.attributeKeyPrinter(fullKey)
|
||||
+ Utility.decodeKeyName(this.attributeKeyPrinter(fullKey))
|
||||
+ this.attributeValueConjunctionSign
|
||||
+ (
|
||||
isSerialized
|
||||
|
||||
@@ -15,7 +15,7 @@ export default class ObjectSerializer extends ISerializer {
|
||||
case "Class":
|
||||
case "Name":
|
||||
case "CustomProperties":
|
||||
// Serielized separately
|
||||
// Serielized separately, check write()
|
||||
return false
|
||||
}
|
||||
return super.showProperty(entity, object, attributeKey, attributeValue)
|
||||
@@ -47,7 +47,7 @@ export default class ObjectSerializer extends ISerializer {
|
||||
* @param {Boolean} insideString
|
||||
*/
|
||||
write(entity, object, insideString) {
|
||||
let result = `Begin Object Class=${object.Class.path} Name=${this.writeValue(entity, object.Name, ["Name"], insideString)}
|
||||
let result = `Begin Object Class=${object.Class.path} Name=${this.writeValue(entity, object.Name, "Name", insideString)}
|
||||
${this.subWrite(entity, [], object, insideString)
|
||||
+ object
|
||||
.CustomProperties.map(pin =>
|
||||
|
||||
Reference in New Issue
Block a user