We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 555f1c8 commit d0bbe2bCopy full SHA for d0bbe2b
src/styles.typ
@@ -223,14 +223,29 @@
223
224
if base != (:) {
225
if root != none {
226
+ if type(root) != array {
227
+ root = (root,)
228
+ }
229
let a = (:)
- a.insert(root, base)
- base = a
230
+ for key in root.rev() {
231
+ a.insert(key, base)
232
+ base = a
233
+ a = (:)
234
235
}
236
dict = util.merge-dictionary(dict, base, overwrite: false)
237
238
+
239
+ let d = if root == none {
240
+ dict
241
+ } else if type(root) == array {
242
+ root.fold(dict, (d, k) => d.at(k))
243
+ } else {
244
+ dict.at(root)
245
246
247
return resolve(
- if root != none { dict.at(root) } else { dict },
248
+ d,
249
if root != none {(dict,)} else {()},
250
merge
251
)
0 commit comments