Summary
Markdown files that are created in external markdown and text apps will have their formatting completely overridden and/or lost when edited through the Nextcloud web interface. Newlines, tabs, and spaces are thrown out everywhere in the document--not just on the edited line--and lists will be changed to asterisks instead of dashes. See screenshots below.
Background
I use external text editors for my markdown files and then sync them to my Nexctloud. I primarly use Atom for its markdown support but will also use basic text editors like Gedit on Linux or Notepad on Windows. That's the great thing about markdown files, after all, they're just plain text. When I edit these files through my Nextcloud web interface, the formatting of the entire file is destroyed.
Related: https://github.com/nextcloud/text/issues/390
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the Text app to not completely destroy any formatting created by external apps. If any special formatting is unsupported, it should be left alone for maximum compatibility with external apps. If any formatting changes must be made based on the current edits, those changes should apply ONLY to the current edits and not the entire file.
Screenshots
How it looks in Gedit under Linux:

How it looks when opened in my Nextcloud web interface:

Make an edit through the web interface and now the file's formatting has been destroyed when viewed in Gedit:

Client details:
Server details
Text app version: 1.1.1
Operating system: Ubuntu 18.04.3
Web server: Apache
Database: Mysql 5.7.29
PHP version: 7.3.13
Nextcloud version: 17.0.2
Second that!
EDIT: Just found another extremely problematic behaviour: Automatic escaping of footnotes. Also not specified in CommonMark, of course, but it should not simply escape the square brackets, because it fully breaks support in those third-party editors that support those (besides, having links defined in-text and then the link at the bottom is in fact common, which uses exactly the same format)

We use pico cms Nextcloud-Integration and need to be able to edit those .md files via Nextcloud.
However, this bug effects the ability to edit pico files, f.e. _meta.md looses all it's formatting and since it has a yaml header, it destroys parts of the website.
This is especially annoying, since there is no possibility to use the markdown editor or any other editor anymore in NC 18...
May I suggest that, while WYSIWYG in Markdown is cool to have, a plain code view would be the easiest solution for the meantime until the mode works for everyone, so that we can work with the files easily without fearing to lose any data?
As the plain view was already implemented, it shouldn't prove too difficult to re-enable that and simply offer people a switch between the two!
A plain code view for the Text App would be wonderfull, as it would render the pico integration in NC 18 usable again
somewhat like this would be great.... how can i throw bugs on a bounty for this? (<- noob)

I've been having this issue as well. It disheartens me that we are now at NC19 and this still hasn't been addressed. The pico CMS is huge as it breaks the YAML code on the file.
Most helpful comment
May I suggest that, while WYSIWYG in Markdown is cool to have, a plain code view would be the easiest solution for the meantime until the mode works for everyone, so that we can work with the files easily without fearing to lose any data?
As the plain view was already implemented, it shouldn't prove too difficult to re-enable that and simply offer people a switch between the two!