Start a new topic

Code trunks do not change background color automatically

I found that the code trunk in "preview" mode does not automatically turn into the grey background until I accidentally enter another new line after ```, as shown below.

Before entering a new line:

After entering a new line then delete it. 

Surely this is no big deal, just a couple of key strokes each time I switch on the "preview" mode. But it takes a lot of luck to find out the secret, and it is such a beautiful style provided by DraftDown! Don't hide it. Reading code trunks without the background color can be a pain. 

1 Comment


There are still a few quirks with some of the markdown syntax which usually dont manifest apart from niche scenarios like leanpub flavour sections with code examples within. However as we improve the functionality we hope to be able to tighten up this sort of thing.

I think the underlying issue you are seeing is down to how the syntax highlighter is initialized, and I think on the local branches we were working on there was some fix for this, as there was also a large issue with the exports which implodes the editor currently :(

Anyway I will make sure we look at improving the behaviour of the syntax styling upon initial previewing.

Login or Signup to post a comment