THE GITHTML FIELD GUIDE
Markdown line breaks: choose a new line or a new paragraph
Use a blank line when two thoughts belong in separate paragraphs. Use an explicit hard break only when the next line remains part of the same unit, such as a postal address. A source newline can render as a space, so preview the actual Markdown processor instead of judging the editor alone.
Identify the unit you are writing
A cramped README often begins as text that looks nicely arranged in an editor. The author presses Return after each sentence and assumes the rendered page will preserve those divisions. Decide first whether the reader should experience a new paragraph, a continued sentence, or a deliberate line boundary. These are writing decisions before they are syntax decisions. A two-line street address benefits from a retained break; two unrelated setup warnings deserve separate paragraphs. Avoid adding a break after every sentence merely to imitate your editor's width. That produces brittle reading on narrow screens and makes later copy editing harder.
Make a small comparison fixture
Create a scratch Markdown file containing the same sentence pair in three forms: one newline, a blank line, and an explicit hard break. Render it with the project's normal preview command. In CommonMark, two trailing spaces or a backslash before the newline can request a hard break. The backslash is easier to notice during review, while trailing spaces may be stripped by formatters. Choose a convention the team can maintain. Keep the fixture alongside parser-upgrade checks when this distinction matters to your documents. Do not change editor-wide whitespace settings until you know whether the formatter or renderer caused the observed result.
First paragraph.
Second paragraph.
Building A\
Second floorCheck the reading result rather than the source shape
Compare the three rendered outputs and choose the simplest one that conveys the intended relationship. Copy the rendered address into plain text and ensure its pieces remain understandable. Then narrow the preview window: the browser should still be free to wrap long lines naturally. Inspect an exported HTML copy separately if the publishing pipeline converts Markdown through another tool. gitHtml reads that separately generated HTML; it does not interpret the original Markdown file. Record which processor and configuration produced the accepted result, particularly if contributors alternate between GitHub previews and a documentation generator. An editor's visual wrap setting is not part of the Markdown file. Include this distinction in contributor guidance so authors do not add hard breaks merely because their own screen displays a long line.
- Separate independent setup warnings with blank lines before changing any renderer configuration.
- Use an address or short verse as the hard-break test, not a paragraph artificially wrapped to eighty characters.
- Re-run the fixture after formatting the source to reveal whether whitespace cleanup changed the intended break.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.