Panda: Code blocks are not correctly recognized inside list items

Testing version: Version 1.0 (1563)

What were you doing: Writing up a technical answer on another Discourse forum!

What feature did you use: Lists with code blocks inside of them:

- a list item with some code in it:

    ```js
    function cool() {
      alert("This is neat!");
    }
    ```

What happened:

It did not correctly interpret the code block as a block item within the list. Instead, it treated it as an indentation-powered code block:

What did you expect to happen:

It should render roughly the same way it does on Discourse:

1 Like

Thanks for the report, this is a rendering bug that we need to address.

It’s on our list but it doesn’t have a high priority. I’ll try to tackle this soonish :slight_smile:

Best.

1 Like

There seems to be some improvement here, but things still get weird:
Here’s a video: CleanShot 2023-03-28 at 15.31.23 · CleanShot Cloud

Things that seem to affect behavior:

  • whether you make a new line by making a new list item and hitting backspace vs. control+return
  • return behavior gets weird after code block back-ticks within a list item
  • some formatting seems only possible by pasting in markdown

It looks like tables don’t render within lists at all.

1 Like

There are bunch of weird behaviors on the code block inside bullet list

  1. 00:09~00:13 - abc should be inside code block; or at least indented by an amount of a bullet.
  2. 00:21~00:25 - Three backticks should be inside the code block with an indentation.
  3. 00:26~00:32
    a. Indents much more than normal list with depth
    b. abc and closing backticks are not indented
  4. 00:36~00:40
    a. When the tab pressed in front of abc, abc should be in the code block
    b. Two of three backticks are removed
  5. 00:43~00:45
    a. When shift+tab on the abc line, abc indents back a little; the whole list item (≈ the code block) gets unindented more than abc does.
  6. 00:46~00:50
    a. When the tab pressed with the two last lines selected, the first line (abc) gets unindented by half a bullet; while the bullet and the code block indented much more than 1 bullet.
  7. 00:51~00:53
    a. When the tab pressed at the front of the last backtick, ab and c are separated and the cursor goes in between ab and c.
    b. Also the backtick removed
  8. 00:55~
    a. When the return pressed right after ‘c’, the app got stuck

Forgot to mention. Using Bear 2.0 (10688).

Resurfacing this bug. Just curious if this is planned to be fixed before or after 2.0 launch?