obsidian-advanced-slides icon indicating copy to clipboard operation
obsidian-advanced-slides copied to clipboard

Codeblocks are not rendering as expected

Open FrenzyExists opened this issue 2 years ago • 3 comments

Describe the bug Codeblocks are not working as the documentation says

Samples to Reproduce Literally copy/paste the codeblock from the docs and instead of getting the expected codeblock, you get this: image

Expected behavior This of course image

Some extra details I don't know if this will help, but I'm using the app-image on archlinux. I even tried disabling the default slides extension that obsidian already comes with and it doesn't change anything. Interestingly, the default slides extension DOES show the code block as expected. Hope this helps

FrenzyExists avatar Nov 06 '22 00:11 FrenzyExists

Ohh yeah, i was able to reproduce it. Thx for the bug report

MSzturc avatar Nov 06 '22 17:11 MSzturc

I have the same issue. In my example it looks like it has something to do with curly braces. Most likely an escaping issue.

Here's a sample from where I have an issue:

syntax = "proto3";

package customer;

service Customers {
    rpc GetCustomerById (GetCustomerByIdRequest) returns (CustomerDetails);

	rpc GetCustomerByFoo (GetCustomerByFooRequest) returns (CustomerDetails);
}

message GetCustomerByIdRequest {
    string id = 1;
}

message GetCustomerByFooRequest {
    int32 id = 1;
}

message CustomerDetails {
    string id = 1;
    string name = 2;
    Address address = 3;
}

message Address {
    string streetName
    string zipCode
}

tnicolaysen avatar Nov 07 '22 17:11 tnicolaysen

It seems a bit flaky. As a workaround, I found that sometimes changing the indentation can help.

For the example from the docs, it's technically invalid Markdown until you remove the indentation on the last line (before the ```). image

That said, I ran into an issue earlier (which lead me to this thread) where I thought I found a valid block that still wouldn't render correctly. But now I can't seem to reproduce it.

samjetski avatar Mar 14 '23 06:03 samjetski