platformer / typst-algorithms

MIT License
141 stars 4 forks source link

Code block renders fully white #12

Closed Proliecan closed 1 year ago

Proliecan commented 1 year ago
#code()[
  ```cpp
    void MyClass::myMethod() {
      cout << "Hello World!";
    }
  (```)
]

() around the backticks is only because of githibs rendering of markdown

renders fully white:

image

platformer commented 1 year ago

Unfortunately I can't reproduce this. With this file:

#import "@preview/algo:0.3.2": *

#code()[
  ```cpp
    void MyClass::myMethod() {
      cout << "Hello World!";
    }

]


I get this output (the excess left padding is because of the excess starting tab on each line):

![image](https://github.com/platformer/typst-algorithms/assets/40146328/fafede97-7b11-4604-a7f2-e50aad159bca)

Would it be possible to provide more or all of your typst file? I bet this is happening because of a rogue show rule somewhere. Also, are you using the web app or the CLI?

Side note: you can include triple backticks in markdown raw text by surrounding the block in more backticks, like so:

`````md
````typst
#code()[
  ```cpp
    void MyClass::myMethod() {
      cout << "Hello World!";
    }

]

Proliecan commented 1 year ago

I am now using another package for my codefigures, and this seems to only happen in my workspace, so I am closing this issue as unreproducable.

platformer commented 1 year ago

That's okay, but I would still like more information about the issue, if possible. This could still be a genuine bug, in which case I will reopen the issue.

Proliecan commented 1 year ago

I tried to isolate the issue and reproduce it - unsuccessfully.

platformer commented 1 year ago

Fair enough, thanks for trying. It may have even been a miscompilation on the web app's part. I'll keep looking out for it in the future.

Proliecan commented 1 year ago

I actually used the package provided for Ubuntu. I am lazy...