Broken indentation in swift code blocks with not-legacy editor

Steps to reproduce

  1. Write a Swift code block.
  2. Write something that will have a { at the end (for example a function):
    func myFunction() {
    
  3. Press return

Expected result

I expect the cursor to jump to the next line and indent that line by one tab.

Actual result

The indentation is incorrect. I noticed this doesn’t happen on other languages that I tested (Java, JS, C#, C++), it happens just with Swift in my experience.

Environment

  • Operating system: MacOS
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.15.6
    Installer version: v0.14.15
    Operating system: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 21.5.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: off
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none


Additional information

No community plugins or custom css used.

thanks