Skip to content

Instantly share code, notes, and snippets.

@camh-
Created June 8, 2020 21:12
Show Gist options
  • Save camh-/7ebc958fbde43b44c2fd231cf4574d8a to your computer and use it in GitHub Desktop.
Save camh-/7ebc958fbde43b44c2fd231cf4574d8a to your computer and use it in GitHub Desktop.
Markdown is text too

Markdown is a way to apply unobtrusive formatting to text files to give it a bit of structure that can also be parsed so it can be presented in a GUI even more prettily than the text version.

Please remember that markdown is a text format first - you should make it readable as text. The readable GUI version comes automatically due to the nice GUI formatting, but it is easy to forget this and write markdown for GUI presentation only. Pay attention to how your text looks.

Things to do

  • Wrap your paragraphs at 80 columns - This has nothing to do with punch cards as people like to say - instead it is about your eyes tracking horizontally and how well they can keep track of the line when they finish a line and return back to column 1. It also prevents a line being wrapped prematurely making a mess of the text layout. You can expect that people will be able to see at least 80 columns before reaching the right edge of the window.

  • Use a four-space indent for code blocks instead of triple-backticks. This puts less visual clutter on the page. If you need to specify the the syntax colouring with a language/keyword after the backticks, then you'll need to use backticks. But if you don't need that, just indent with spaces.

What works poorly

  • Table cells cannot be wrapped inside the cell - it needs to be one big long line.

  • Link formatting cannot be broken between the closing square bracket and the opening parenthesis. This is a natural place to want to break the text and makes for good text-based flow. Unfortunately you need to break before the last word of the link text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment