Skip to content

Newlines in class shape title affect box size but not text wrap #1945

@snajder-r

Description

@snajder-r

This is probably low-priority, but it seems like a bug. I was trying to put a line break into a class name as a workaround for #1081, annotating the class with a "stereotype".

However, the following code

A: "<<enumeration>>\nAlignment"{
    shape: class
    
    LeftAligned
    CenterAligned
    RightAligned
    Justified
}

built with

d2 --theme=200 -l elk filename.d2

results in a shape that looks like this:

image

It seems like the height of the class-name box has been adjusted for 2 lines, but the text doesn't actually wrap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrender

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions