Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

EditorConfig for Markdown

I am using the basic EditorConfig configuration for Markdown files.

trim_trailing_whitespace = true
indent_style = space

I trim trailing whitespace to adhere to Markdownlint recommendations for “Trailing spaces” (MD009). Do note that this conflicts with the Markdown specification for inserting a line break, by ending a line with two consecutive spaces, so of you need this particular Markdown feature, you should disable: trim_trailing_whitespace:

trim_trailing_whitespace = false

Currently I do this in my global file ($HOME/.editorconfig) so I do not have any surprises, when just editing Markdown and then on a project or repository basis I enable it where the Markdownlint rules makes more sense.

I use indentation style based on spaces, to adhere to Markdownlint recommendations for “Unordered list indentation” (MD007).