Code block does not respect indentation on paste

Describe the bug

Pasting code in the code block does not respect the indentation of the copied snippet. This appears to work correctly in the desktop app

To Reproduce

Steps to reproduce the behavior:

    1. Create a code block
    1. Copy some code snippet with indentation
    1. Paste it in inside the code block

Expected behavior

The indentation of the copied snippet should be respected as the desktop app

Desktop (please complete the following information):

  • OS: Android 11
  • Version: 0.2.2

Additional context

Screen Recording of the desktop app and the android device showing the difference in paste behavior inside code block. Kindly forgive me for the low resolution of the recorded video, will correct them next time.
incorrect-code-snippet-block-pasting.mp4

3 Likes

Can reproduce this in v0.6.1 as well


I get two options when trying to paste copied content in Anytype. One is paste and another is paste as plain text. Using paste as plain text respects the code’s indentation whereas using paste removes the line endings and change the text into a single line.