# Newline characters not being accepted by the api

**URL:** <https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723>\
**Category:** Developers\
**Tags:** Solved\
**Created:** [June 16, 2023, 11:38am UTC](https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723 "2023-06-16T11:38:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmueller](https://community.supernotes.app/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jmueller](https://community.supernotes.app/u/jmueller)\
**Post date:** [June 16, 2023, 11:38am UTC](https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723/1 "2023-06-16T11:38:48Z")

</div>

Hey Supernotes Community,  
I started developing an **unofficial** Supernotes Add-on,  
that has the main focus to add a spaced repetition System to standard Supernotes Cards.  
This System should be basically a light version of the remnote approach to spaced repetition.  
Now I have the problem that I can’t update multiline cards as stated in [the issue on GitHub](https://github.com/Jotrorox/supervocab/issues/1).  
The part of code that is relevant in this case would be in src/card\_checker.rs:125-149, as well as in src/markup\_updater.  
If anyone has an Idea of why this is not working, please tell me or make a pull request.  
And if anyone has questions/further ideas regarding the project, don’t bother to ask me about it.  
Johannes

Side note:  
The project is still in development and not even near a state where I would call it complete,  
so please don’t use it right now or if you really want to, keep this in mind.

---

<div class="post-metadata">

**Author:** ![jmueller](https://community.supernotes.app/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jmueller](https://community.supernotes.app/u/jmueller)\
**Post date:** [June 16, 2023, 11:55am UTC](https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723/2 "2023-06-16T11:55:55Z")

</div>

Here are a few screenshots of the requests and the updated markdown.

Response get cards request:

 ![Screenshot from 2023-06-16 13-49-26](https://community.supernotes.app/uploads/default/original/1X/6d821c5b99ef3fdac3e9bda34df1128ad6a88692.png)

Gotten Markdown and updated markdown:

 ![Screenshot from 2023-06-16 13-49-45](https://community.supernotes.app/uploads/default/original/1X/619e5fe541e820f1fa80da0bf9a9367a654638b1.png)

Response to update card patch request:

 ![Screenshot from 2023-06-16 13-50-03](https://community.supernotes.app/uploads/default/original/1X/1acd64f5ce609b85fb2a005e352ca2639180fee1.png)

---

<div class="post-metadata">

**Author:** ![tobias](https://community.supernotes.app/user_avatar/community.supernotes.app/tobias/32/1181_2.png) [@tobias](https://community.supernotes.app/u/tobias)\
**Post date:** [June 16, 2023, 1:17pm UTC](https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723/3 "2023-06-16T13:17:04Z")

</div>

Hi @jmueller,

Thanks for sharing this on the forum. For the update you don’t need to send the whole request back, just the part you wish to modify, like so:

 ![Screenshot 2023-06-16 at 14.11.11](https://community.supernotes.app/uploads/default/original/1X/3ce3dcbcfb2947ba4995c22905380e12706a5c6f.png)

New line characters with `\n` work perfectly and render the card like so:

 ![Screenshot 2023-06-16 at 14.10.20](https://community.supernotes.app/uploads/default/original/1X/79fd766e6c0bb6ff84478e0656344588b9c58b24.png)

You probably know this already, but you can quickly play around with responses in the [Swagger docs](https://api.supernotes.app/docs/swagger) (to authorize add your API key in the top right of the interface), which I definitely recommend doing for debugging as it’s very helpful for quick identifying where things are going wrong.

I hope that helps. Good luck with the add-on!

---

<div class="post-metadata">

**Author:** ![jmueller](https://community.supernotes.app/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jmueller](https://community.supernotes.app/u/jmueller)\
**Post date:** [June 16, 2023, 4:15pm UTC](https://community.supernotes.app/t/newline-characters-not-being-accepted-by-the-api/1723/4 "2023-06-16T16:15:39Z")

</div>

Thanks alot i fixed it by replacing the somehow occurring \n with \n
