Skip to content

Markdown tooltip text rendered out of view #2706

@qhyw99

Description

@qhyw99

Describe the bug
When using the example code from the "Tooltip Near" documentation in the D2 Playground, the text inside the tooltip is not visible.
It appears that the newline immediately following the |md syntax is being rendered as a literal empty line. This pushes the actual text ("God has abandoned this pipeline") downwards, causing it to overflow vertically out of the container's visible area.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://play.d2lang.com/
  2. Paste the following code (from official docs:https://d2lang.com/tour/positions/#tooltip-near)
ci-runner
codedeploy: {
  tooltip: |md
    God has abandoned this pipeline
  |
  tooltip.near: center-left
}
aws instance

ci-runner -> codedeploy -> aws instance: safe deploy
ci-runner -> aws instance: direct deploy
  1. Observe that the codedeploy tooltip appears empty or only shows the very top edge of the text.

Get from playground:

Image

Expected:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions