shuzijun/markdown-editor

Editor should NOT reformat the entire Markdown file

vassudanagunta opened this issue · 2 comments

If i make any small edit using markdown-editor, it will reformat the entire markdown file! This is very bad.

Why is this bad?

  • Imagine editing a single line in a Javascript, Python or other source code in the IDE and it reformats the entire file!
  • It makes diffs very noisy and code reviews very hard. If I change one word, the diff should only have on changed line, and in that line, only one changed word.
  • It causes unnecessary merge and rebase conflicts.
  • It pollutes the CVS/git history, making it very hard to see what really changed in a commit.
  • It disrespects the author's coding style and standards. Markdown files in a project should be treated and respected as source code just like any other file in the project. Edits should behave just like edits to code.

Many projects will not be able to use this plugin because of this problem.

Expectations:

  1. Any change to one line should never result in changes to any another line. The only except to this is a change that must change other lines, e.g. increasing the nesting level of a list item will change all items in that list item.

  2. Changes should always be minimal. If I fix a spelling error, only that word should be changed. The containing block should not be reformatted.

  3. Respect the existing formatting. For example, if a list is formatted as a tight list (without blank lines between items), DO NOT insert blank lines between items and change it into a loose list.

  4. Respect IDE settings, such as Editor:General:Remove trailing spaces on and Editor:Code Style:Markdown

I can understand this scenario, but limited by lute can not support this scenario.

Thanks for response!

Can you submit an issue against lute? I would do it, but I don't know the details as you do. You could point to this issue when you submit it.