In *.custom.yaml, values from the immediate children key-value pairs under the node patch: will substitute values with the same key-path from the YAML document.
It's important to specify in the patch a key-path separated with / for values in a nested YAML map.
For example, the following code in RimeConfigController.m:
[_squirrelConfig patchValue:_colorTheme forKeyPath:@"style.color_scheme" error:&error];
generates an incorrect patch
patch:
style:
color_scheme: blah
which should be:
patch:
"style/color_scheme": blah
The problem with the former patch is, other children of the node style would be lost in the patched file, since the YAML value to be patched is the entire map (ROOT)/style.
In
*.custom.yaml, values from the immediate children key-value pairs under the nodepatch:will substitute values with the same key-path from the YAML document.It's important to specify in the patch a key-path separated with
/for values in a nested YAML map.For example, the following code in RimeConfigController.m:
generates an incorrect patch
which should be:
The problem with the former patch is, other children of the node
stylewould be lost in the patched file, since the YAML value to be patched is the entire map(ROOT)/style.