(Android) plakken met het klembord van het toetsenbord in een codeblok retourneert slechts de eerste regel

AI-generated summary

NameLessGO reported a bug in the Android version of Anki where pasting text from the keyboard’s clipboard into a code block only returns the first line. The issue can be replicated by creating an empty code block and pasting text using the keyboard’s clipboard function. sam confirmed the bug and noted that hard line breaks are not being preserved in code blocks, which may be related to the issue reported by NameLessGO. The team is aware of the issue and expects to respond in the upcoming days.

How to replicate (Everything is done with the new composer)

  1. Create a code block, a preformatted text with nothing on it

  1. Copy and paste the text using the keyboard’s clipboard function :clipboard: (In this example using Google Keyboard, haven’t tested on others)
AnkiDroid Version = 2.22.2 (44bf67dc264fa0a99d44e84ed518e3a4dd8b0367)  

Expected behaviour

  • If you use the Android paste function, press and hold, then it will paste the full text with no issues
AnkiDroid Version = 2.22.2 (44bf67dc264fa0a99d44e84ed518e3a4dd8b0367)  
Backend Version = 0.1.59-anki25.07.4 (25.07.4 e511d63b7ef57e7d7e81612a9905172b871d18df)  
Android Version = 15 (SDK 35)  
ProductFlavor = play  
Device Info = samsung | samsung | o1s | o1sxxx | SM-G991B | exynos2100  
Webview User Agent = Mozilla/5.0 (Linux; Android 15; SM-G991B Build/AP3A.240905.015.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/139.0.7258.62 Mobile Safari/537.36  
ACRA UUID = ec00a895-ed42-45ec-8a32-e460dcc67355  
FSRS = 4.1.1 (Enabled: true)  
Crash Reports Enabled = true

Issue was found on Anki Forum

1 like

Bedankt voor je melding!

Ik kan iets soortgelijks reproduceren rond het verprutsen van harde regeleinden in codeblokken.

Gegeven de volgende tekst:

Hello
world

Hello

World

Kopieer en plak in een codeblok:

Helloworld

Hello

World

Het lijkt er dus op dat harde regeleinden niet behouden blijven. Misschien is er een vergelijkbaar geval bij het plakken in Android.

Dit staat op onze lijst. Verwacht de komende dagen een reactie van het team.

1 like