Update compile.go
This commit is contained in:
parent
e40a65ae79
commit
3db70bb31d
1 changed files with 3 additions and 0 deletions
|
|
@ -270,6 +270,9 @@ func (c *compiler) compileLabel(attrs *d2graph.Attributes, f d2ir.Node) {
|
||||||
// TODO: Delete instead.
|
// TODO: Delete instead.
|
||||||
attrs.Label.Value = scalar.ScalarString()
|
attrs.Label.Value = scalar.ScalarString()
|
||||||
case *d2ast.BlockString:
|
case *d2ast.BlockString:
|
||||||
|
if scalar.ScalarString() == "" {
|
||||||
|
c.errorf(f.LastPrimaryKey(), "block string cannot be empty")
|
||||||
|
}
|
||||||
attrs.Language = scalar.Tag
|
attrs.Language = scalar.Tag
|
||||||
fullTag, ok := ShortToFullLanguageAliases[scalar.Tag]
|
fullTag, ok := ShortToFullLanguageAliases[scalar.Tag]
|
||||||
if ok {
|
if ok {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue