Hello!, when a field contains new lines, using addnote url-scheme to create a note removes the new lines and replaces them with single space.
example of field value:
これは
例です
Swift string output: "これは\n例です"
Using .addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
to be able to add it as a fld query param in Anki’s addnote url-scheme:
"fldNotes=%E3%81%93%E3%82%8C%E3%81%AF%0A%E4%BE%8B%E3%81%A7%E3%81%99"
Checking if newlines are still there after transforming back to regular string by using “.removingPercentEncoding”:
▿ Optional<String>
- some : "これは\n例です"
How it looks in the created note (new lines replaced by single space):
Should I encode the string in a different way? I am not sure if there is anything on my side I can do to get new lines in the fields.
Any help is welcomed! Thank you.