emogrifier
emogrifier copied to clipboard
Indentation for Markdown files
We currently mostly have 2 spaces indentation, e.g. in bulleted lists in CHANGELOG.md
and README.md
. But we have 4 spaces indentation specified in .editorconfig
for .md
files. We should either change the .editorconfig
or reformat the .md
files. Possibly some reformatting of some .md
files is needed either way.
From https://github.com/MyIntervals/emogrifier/pull/1035#issuecomment-823208644:
- https://www.markdownguide.org/basic-syntax/ does not say anything about indentation styles.
- https://markdown-guide.readthedocs.io/en/latest/basics.html says "4 spaces"
- https://google.github.io/styleguide/docguide/style.html also says 4 spaces
I'll need to do some more research on the recommended maximum line length for Markdown. 120 might be less common than 80 characters.
If using an IDE, or indeed any editor supporting multiple file types, wouldn't it make sense for the line length limit to be the same across all file types for the project?
The 'common' line lengths for various file types are probably going to depend on their distribution amongst projects versus the consensus preference among the team working on them and what editors they're using.
For example, research would probably indicate a line length of no more than 78 for shell scripts. But if no-one's ever going to edit them on a TTY, is there any reason for that restriction?
So I would stick with the project-established 120 characters for all file types, unless there's any justifiable reason for variation on any specific one (which I am yet to see). I.e. don't over-think or over-research it too much :)
It can always be changed later.