Skip to content

Commit 2b9d2da

Browse files
committedMar 7, 2024
fix another
1 parent 0d4e2dd commit 2b9d2da

File tree

9 files changed

+3863
-13109
lines changed

9 files changed

+3863
-13109
lines changed
 

‎d2ir/compile.go

+1
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ func (c *compiler) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool {
413413
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(dst)))
414414
}
415415
delete(gctx.appliedFields, ks)
416+
delete(gctx.appliedEdges, ks)
416417
return false
417418
}
418419
}

‎d2ir/filter_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,21 @@ x -> y
150150
assertQuery(t, m, 0, 0, 0.1, "(x -> y)[1].style.opacity")
151151
},
152152
},
153+
{
154+
name: "label-filter/3",
155+
run: func(t testing.TB) {
156+
m, err := compile(t, `
157+
(* -> *)[*]: {
158+
&label: hi
159+
style.opacity: 0.1
160+
}
161+
162+
x -> y: hi
163+
`)
164+
assert.Success(t, err)
165+
assertQuery(t, m, 0, 0, 0.1, "(x -> y)[0].style.opacity")
166+
},
167+
},
153168
{
154169
name: "lazy-filter",
155170
run: func(t testing.TB) {

‎d2ir/import_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ label: meow`,
232232
_, err := compileFS(t, "index.d2", map[string]string{
233233
"index.d2": "...@'./../x.d2'",
234234
})
235-
assert.ErrorString(t, err, `index.d2:1:1: failed to import "../x.d2": stat ../x.d2: invalid argument`)
235+
assert.ErrorString(t, err, `index.d2:1:1: failed to import "../x.d2": open ../x.d2: invalid argument`)
236236
},
237237
},
238238
{

0 commit comments

Comments
 (0)
Failed to load comments.