Indenting list converts tabs to 2 spaces

Testing version: 0.1 (3139)

What were you doing: indenting a list item

What feature did you use: task/check lists

What happened: it converted all of the indentations in the list to 2 spaces instead of tabs

What did you expect to happen: indent with a tab like the list was originally indented with

Panda should not convert indentations from tabs to spaces. The app is currently unusable and I cannot continue testing the app until this bug is fixed because it completely changes entire documents every time i try to indent a list. Please fix in the next release!

Hello,

do you mind to articulate about the problems you are experiencing when comes to indenting lists? Maybe a video will help us understand.

Best Regards.

Hi Danilo, here are the steps to reproduce the problem:

  1. on macOS Panda beta, make a new markdown document. add a task list to it and add for example 3 levels of tasks. indentation in the list should be in tabs, not spaces. also open this file in a text editor like VS Code alongside it so you can see whitespace characters:
    Screenshot 2022-12-13 at 2.30.50 PM.pngPastedGraphic-1.png

  2. open the file in panda beta on iOS and add another task list item or make an edit anywhere in the list:
    PastedGraphic-2.pngPastedGraphic-3.png

  3. When the file on iOS saves to iCloud drive automatically, it will update the file open on the Mac. go back to the file on the Mac and you can see that the tabs for indentation have been changed to spaces:
    PastedGraphic-4.pngPastedGraphic-5.png

So, in summary, editing a task list in the iOS version of the app automatically makes unsolicited changes to indents, changing them from tabs to spaces. Can you please put out a fix for this? As of now, any edits to a file on iOS makes hundreds of changes to my files because i have files that are just very long todo lists which is how i track my project todos. as it stands i cannot easily edit a markdown file in Panda for iOS without it automatically making massive changes to my file that I don’t want.

Please let me know if you need any more information, thanks.

-Max

Currently, this is the intended behavior of the editor, we’re normalizing the indents to have a more homogeneous editing experience.

This is designed for Bear, but Panda is sharing the code with it so it gets this behavior too, in the future if we decide to release Panda as a standalone app we’ll probably have a preference to opt-out of this.

Best.

The problem with this behavior is that it prevents pasting from Bear 2 and Panda into standard markdown editors (e.g. Obsidian). And it even corrupts pasting back into Bear 1. See image below.

Notice how the sub-bullets are not properly indented in Bear 1. And if you were to paste the Bear 2 bullets into Obsidian, you would see the same corrupted behavior where the sub-bullets are not properly indented.

As it is today, pasting bullets in and out of Bear 1 works perfect well. But Bear 2 and Panda are problematic. Please re-consider this behavior @matteo to use the standard 4 spaces, same as Bear 1.

Thank you.