UserScripts icon indicating copy to clipboard operation
UserScripts copied to clipboard

Code formatted with three backticks gets replaced by inline code

Open DonaldDuck313 opened this issue 5 years ago • 1 comments

If a post has a code block surrounded by three backticks (```), the magic editor will remove all backticks except one and indent with 4 spaces. For example

```
code here
```

will be edited to something like

`
    code here
`

I get why this was implemented before Stack Overflow supported code blocks with ```, but now that they supported, I think this feature should be removed. Also if you really want to keep this, you should at least make it remove all the backticks.

Demo: Try applying the magic editor to this formatting sandbox post.

DonaldDuck313 avatar Jul 03 '20 21:07 DonaldDuck313

This is effectively a duplicate of #181. However, its statement of the problem clearer, due to not intermixing two issues.

makyen avatar Jul 03 '20 22:07 makyen