-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Overview
The goal of this issue is to clarify automatic markdown formatting, the modification notification without any document interaction and further steps to improve the situation.
The document is always formatted
Some would say this is a great feature and others don't. Mark Text formats all content according CommonMark and GFM (+other extensions if enabled). The reason for this is that we don't store the document as string with spaces etc but as block structure with minimal information. As a side effect, we need to build the text file when saving the document. In some situations, we don't know the formatting of the original document and apply the default style according markdown specification.
Why is my document modified after opened?
That's an issue with our data structure/flow and cursor positioning but will hopefully fix soon as we (@Jocs) refactor the data structure and get rid of the old data flow. This should also bring better performance and extension support the core of the editor.
Next steps
It's currently not planned to change the markdown formatting as it's built-in into the editor but as we continuously improve our engine, we'll keep this issue in mind and try our best to overwrite as little as possible. The removal of empty lines is currently not addressed as it would require a significant work to our markdown parser and data structure (#1354).
TODO's:
This is a non-exclusive list for improvements that require changes to the markdown parser, data structure and other parts of the core engine:
- List formatting (keep original list style)
- Keep old ordered lists numbering; that's against markdown specification -> settings options
- SetExt heading count
- Footnote positioning (see Marktext should not move footnotes contents to the real end of document #2036)
- Don't style table cells
Please feel free to contribute on these issues. Any development will be tracked here.