Nested and indented ini / shell code blocks break formatting in editor

Do you see the same behavior in Reading View, or is this a Live Preview quirk?

1 Like

Thanks for the reminder, it only appears with the live preview, else seems to look good.

are this and this the same issue as here?

the first yes (merging it here), the second no.

This bug is specific to shell, ini. It doesn’t happen to all types of codeblocks.

1 Like

Imagine the `` (double backticks)` were ``` (triple backticks) in the following code blocks

The following will break source mode:

- this will break source mode
    ``shell
    'C:\path\to\file\'
    ``

If we get rid of the trailing \ of the windows path, then source mode won’t break:

- this won't break source mode
    ``shell
    'C:\path\to\file'
    ``

Tip: You can show code block markers inside a code block by using a larger number of backticks in the outer one. You can nest multiple times, as I did here to be able to show the example.

Source:

````
- this will break source mode
    ```shell
    'C:\path\to\file\'
    ```
````

Result:

- this will break source mode
    ```shell
    'C:\path\to\file\'
    ```
1 Like