App crashes when editing after a folded section ending with a math formula

  • Bear Version: 2.5.1 (13605)
  • OS Version: MacOS 15.6.1
  • What were you doing:

Create a note with the following content.

# Test
## Folded section
$$
y = ax + b
$$
## Other section

Fold the section named “Folded section”.

Add text on the line immediately below the title in “Other section”.

Notes

  • The issue seems to happen only when the math formula is on the last line of the folded section. Adding an empty line between the formula and the next section title prevents the issue.

  • The issue seems to happen only when adding text on the first line below the folded section. Adding/editing text further down in the note does not cause any issue.

  • What feature did you use: Maths, folding

  • What happened: The app briefly and partially showed the math formula in the folded section, then crash.

  • What did you expect to happen: That the app would not show anything in the folded section and that it would not crash. :wink:

1 Like

Thank you very much for reporting this bug and the details for reproducing it. We’ll try to fix it for the next release.