terrastruct / d2-obsidian

The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
217 stars 12 forks source link

Rendering of Code blocks is not correct #21

Open Paracelsus-Rose opened 1 year ago

Paracelsus-Rose commented 1 year ago
block:||ts
//This is a code block that should be formatted right
||

Rendered in Obsidian D2 image play.d2 image d2 cli w/ tala image

AdroDG commented 1 year ago

+1 successfull from command line: image but wrongly rendered in obsidian image

my_code: |||ts
  declare function getSmallPet(): Fish | Bird;
  const works = (a > 1)||(b < 2)
||| {
    near: top-right
}

A: My client {
    icon: https://as2.ftcdn.net/v2/jpg/02/29/75/83/1000_F_229758328_7x8jwCwjtBMmC6rgFzLFhZoEpLobB6L8.jpg
    action
    style.fill: "#AAAAAA"
}
B: {
    db1: Main\nDB {
        shape: cylinder
    }
    db2: Backup\nDB {
    style: {  
          stroke: blue  
          font-color: red  
          stroke-dash: 3  
          fill: white  
        }       
        shape: cylinder
    }
    db1 -> db2: every hour
}

other: |||ts  
  declare function getSmallPet(): Fish | Bird;
  const works = (a > 1)||(b < 2) 
|||

Am I missing a thing ?