export root

This commit is contained in:
Júlio César Batista 2023-04-14 15:08:18 -03:00
parent 3c43db31d0
commit 00ed4ca75b
No known key found for this signature in database
GPG key ID: 10C4B861BF314878

View file

@ -694,7 +694,7 @@ func renderPDF(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, opt
var currBoardPath []string var currBoardPath []string
// Root board doesn't have a name, so we use the output filename // Root board doesn't have a name, so we use the output filename
if diagram.Name == "" { if diagram.Name == "" {
currBoardPath = append(boardPath, getFileName(outputPath)) currBoardPath = append(boardPath, "root")
} else { } else {
currBoardPath = append(boardPath, diagram.Name) currBoardPath = append(boardPath, diagram.Name)
} }
@ -781,7 +781,7 @@ func renderPPTX(ctx context.Context, ms *xmain.State, presentation *pptx.Present
var currBoardPath []string var currBoardPath []string
// Root board doesn't have a name, so we use the output filename // Root board doesn't have a name, so we use the output filename
if diagram.Name == "" { if diagram.Name == "" {
currBoardPath = append(boardPath, getFileName(outputPath)) currBoardPath = append(boardPath, "root")
} else { } else {
currBoardPath = append(boardPath, diagram.Name) currBoardPath = append(boardPath, diagram.Name)
} }