Quick Syntax Reference

  • # Heading H1 (use ## for H2, ### for H3)
  • **bold** / *italic* or __bold__ / _italic_
  • [text](url) hyperlink
  • ![alt](image.png) image (! prefix)
  • ```language fenced code block with syntax highlighting

Markdown Origin Story

  • Created by John Gruber & Aaron Swartz in 2004 as 'email-style' writing
  • Goal: Write prose that reads naturally AND converts to valid HTML
  • Name is a wordplay on 'markup' (HTML) → 'markdown' (simpler)
  • Now powers GitHub, Reddit, Stack Overflow, Notion, Discord, and most dev docs

Flavor Differences

  • CommonMark: Standardized spec (2014) to fix ambiguities in original
  • GitHub Flavored (GFM): Adds tables, task lists [ ], strikethrough ~~text~~
  • MDX: Markdown + JSX components for React docs
  • This formatter: Supports CommonMark + GFM specifications

Pro Tips

  • Two spaces at line end = <br> (soft break). Empty line = new paragraph
  • Indent code blocks with 4 spaces OR use ``` fences (fences are cleaner)
  • Reference-style links [text][id] keep paragraphs readable in source
  • Escape special chars with backslash: \* \# \[ to show literally
  • Tables: | Col1 | Col2 | with |---| separator row (GFM only)