Backticks break images and sketches

Panda 1.0 (3096) on macOS 12.5

Even if there is nothing below the code fence, I have felt stuck inside the code block, when I forget that I need to close it.

One possible solution to both of these problems would be to auto-close the code fence, similar to how many programmer’s editors auto-close various tags. Typing just 3 backpacks could result in something like this:

```
```

With the cursor still on the first line, ready to type in some code or language name:

```| <- cursor
```

That auto-closing behaviour may be useful elsewhere in the future too.

For example, the Markdown mode in Sublime Text will auto-close bold when typing a single asterisk, leaving the cursor in the middle **. That case is less important, and a bit trickier to implement. E.g. in Sublime Text, pressing asterisk and then space will remove the second asterisk, because then it’s a list instead of bold.

Workaround

Ctrl-Command-C works in both Panda 1.0 (3096) and Bear 1.9.6 (9044) to create a closed code block that doesn’t mangle the content below. Since that’s fewer keystrokes anyway, I’d will willing to adopt that shortcut.

1 Like