trim_whitespace deletes line jumps from markdown #4640
Unanswered
WhyNotHugo
asked this question in
Q&A - Ask for help with problems
Replies: 1 comment 1 reply
-
|
Oh, re-reading the README for like the fifth time, I notice:
The following works: vim.g.ale_fixers = {
-- ...
markdown = {}, -- Disables trim_whitespace.
["*"] = { "remove_trailing_lines", "trim_whitespace" },
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Markdown allows inserting newlines by inserting two spaces at the end of the line.
Without these two spaces, two consecutive lines are considered part of the same.
If I configure the
trim_whitespacefixer like so:Then the fixer also removes double spaces at the end of the line in markdown files. These are significant and removing them changes how the file is rendered.
How can I prevent this from happening? Note that I do want to remove single spaces at the end of a line for markdown (and every other filetype too).
Beta Was this translation helpful? Give feedback.
All reactions