Skip to content

Code block within spoiler gives different result than shown in preview #222

Open
@mbomb007

Description

@mbomb007

Describe the bug
A code block within a spoiler block gives a different result than shown when looking at the Markdown preview before posting/saving an answer.

To Reproduce

When using the following markdown in the answer editor:

>! ```python
>! if True:
>!     print "Hello World"
>! ```

It shows this result when viewing the preview during editing (with the multi-line code):

Screenshot showing markdown and result when editing an answer

Screenshot is of this answer (it's currently deleted, because it's not yet working as expected)

Note: The markdown only shows as shown in the screenshot when editing an answer and viewing the live markdown preview/result (WYSIWYG), not when editing a question.

Related question

Expected behavior

I would expect the result to look like the preview after posting/saving. I also think that being able to post a code block within a spoiler is useful on https://codegolf.stackexchange.com

Desktop (please complete the following information):

  • OS: Windows 10, 21H2
  • Browser: Chromium 105

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions