6

This is seen the formatting of the answer at https://askubuntu.com/a/1104744/37574:

Live Question

The code block is enclosed in triple-backticks, but displayed as though it were in single-backticks.

If I try to edit the code though, the Preview looks fine:

Question Preview

I suspect it may be something to do with the ordered list, but I can't experiment without Updating the answer.

New contributor
mwfearnley is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
7

This has to do with the age of the post and is in fact happening by design. When it was created in December 2018, Stack Exchange didn't support ``` code fences. It did, however, support ``` as a way of entering inline code with like breaks. That's what the answer in question was doing, purely by accident.

In January 2019, we added support for code blocks as described here: https://meta.stackexchange.com/a/322000/235711

Since Markdown is rendered at time of edit, the answer continued to look off until it received its first edit after January 2019. Since the editor and renderer now support code blocks, the preview correctly matched what would be saved, even though there was no actual change to the markdown.

New contributor
Brian Nickel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
4

I usually double-up the indent for each level of bullet point you're under. So here that's an indent of 8 spaces. And it previews correctly.

1. Update your `/etc/default/grub` accordingly:

        GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
        GRUB_GFXMODE=1152x864x32
        GRUB_GFXPAYLOAD_LINUX=1152x864x32
  1. Update your /etc/default/grub accordingly:

    GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
    GRUB_GFXMODE=1152x864x32
    GRUB_GFXPAYLOAD_LINUX=1152x864x32
    
2

I solved it by indenting the code block by four spaces, which subordinates it under the ordered list:

1. update your `/etc/default/grub` accordingly:

    ```
    GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
    GRUB_GFXMODE=1152x864x32
    GRUB_GFXPAYLOAD_LINUX=1152x864x32
    ```

The issue of the Preview showing something different than the post in the end of course remains.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .