Panda Crashes when Pasting multiple lines that include a code block

Testing version:
Version 1.0 (2595)

What were you doing:
I was pasting text from a github pull request to panda. The text was this (including all spacing)

Before building, add this new receiver into `company/src/main/AndroidManifest.xml`:
    ``` xml
    <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="@null"
            tools:replace="android:permission">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="com.company.androids" />
            </intent-filter>
        </receiver>
    ```

I found that it doesn’t crash when you paste the same text while removing the spacing before the line with the ``` xml.

What feature did you use:
Copy and paste, code block formatting, inline block formatting.

What happened:
The app completely crashed.

What did you expect to happen:
Pasting to be successful.

Hi there,

May I just ask, is this still occurring for you? If so, what device and system version on the device are you using?

Also, where do you have Panda located?

We’ve received previous reports that when users had unzipped Panda in the downloads folder it caused crashes.

If you move it to Applications it should be working again. Let me know if the issue persists and we’ll investigate further! :slight_smile:

HI!

I’m on a MacBook Pro (16-inch, 2019) running macOS Monterey 12.3 (21E230). The Panda.app file is in my applications folder.

I just did a test and unfortunately it still occurs.

I hope that helps!

Thank you for the additional information. I’ve passed the report onto a member of our development team to investigate further :slight_smile:

I can confirm this crash on:
12.3.1 (21E258) / iMac (Retina 5K, 27-inch, 2020)
10.15.7 (19H1824) / MacBook Pro (Retina, 15-inch, Mid 2015)
12.2.1 (21D62) / MacBook Air (Retina, 13-inch, 2019)

It’s not just on paste: it will also crash by just typing in 4 spaces before both triple backticks if there’s a line of text directly above, typing some text on the line before the code block, or deleting an empty line between text and code block with leading spaces.