This commit is contained in:
Alexander Wang 2024-06-05 22:22:47 -06:00
parent 31f2ca66b8
commit d2ec7cd19c
No known key found for this signature in database
GPG key ID: BE3937D0D52D8927
3 changed files with 9 additions and 25 deletions

View file

@ -12,3 +12,4 @@
- Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942) - Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942)
- Globs to null connections work [#1965](https://github.com/terrastruct/d2/pull/1965) - Globs to null connections work [#1965](https://github.com/terrastruct/d2/pull/1965)
- Edge globs setting styles inherit correctly in child boards [#1967](https://github.com/terrastruct/d2/pull/1967) - Edge globs setting styles inherit correctly in child boards [#1967](https://github.com/terrastruct/d2/pull/1967)
- Board links imported with spread imports work [#1972](https://github.com/terrastruct/d2/pull/1972)

View file

@ -512,6 +512,7 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
} }
OverlayMap(dst, impn.Map()) OverlayMap(dst, impn.Map())
c.updateLinks(dst)
if impnf, ok := impn.(*Field); ok { if impnf, ok := impn.(*Field); ok {
if impnf.Primary_ != nil { if impnf.Primary_ != nil {

View file

@ -3,7 +3,7 @@
"name": "", "name": "",
"isFolderOnly": false, "isFolderOnly": false,
"ast": { "ast": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-4:1:22", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-4:1:27",
"nodes": [ "nodes": [
{ {
"map_key": { "map_key": {
@ -30,7 +30,7 @@
}, },
{ {
"map_key": { "map_key": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-4:1:22", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-4:1:27",
"key": { "key": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-2:6:9", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-2:6:9",
"path": [ "path": [
@ -50,11 +50,11 @@
"primary": {}, "primary": {},
"value": { "value": {
"map": { "map": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:8:11-4:1:22", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:8:11-4:1:27",
"nodes": [ "nodes": [
{ {
"map_key": { "map_key": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:7:20", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:12:25",
"key": { "key": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:3:16", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:3:16",
"path": [ "path": [
@ -74,17 +74,17 @@
"primary": {}, "primary": {},
"value": { "value": {
"map": { "map": {
"range": ",1:0:0-1:0:0", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:5:18-3:12:25",
"nodes": [ "nodes": [
{ {
"import": { "import": {
"range": ",1:0:0-1:0:0", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:11:24",
"spread": true, "spread": true,
"pre": "", "pre": "",
"path": [ "path": [
{ {
"unquoted_string": { "unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20", "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:10:23-3:11:24",
"value": [ "value": [
{ {
"string": "x", "string": "x",
@ -97,24 +97,6 @@
} }
} }
] ]
},
"import": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:5:18-3:7:20",
"spread": false,
"pre": "",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
} }
} }
} }