Wikipedia:Line breaks usage

If you add two line breaks (by pressing return twice) to the source text, Wikipedia will create a new paragraph. It is uncontroversial that paragraphs should be used to make articles easy to read. This page, however, refers to single line breaks within article source texts.

Single line breaks in the source text are not translated to single line breaks in the output (if you want a single line break to appear in the rendered article, use a  tag or  template). However, single line breaks in the source do have certain effects: Within a list, a single line break starts either the next item or a new paragraph; within an indentation (which, if marked up with leading colons, is really the definition part of a definition list), a single line break aborts the indentation and starts a new paragraph. Links do not span line breaks (this is intentional, so that authors do not accidentally turn an entire paragraph into a link etc.).

Regardless, some Wikipedians insert single line breaks into the source text of articles for various reasons; others oppose this practice. Readers do not need to care about this controversy since it does not affect the appearance of articles. The two positions are presented below. See the discussion page for the current head count for each position.

Do not use single line breaks
Do not use manually entered hard line breaks within paragraphs when editing articles. Reasons for this include:

of church and state; civil rights issues; pornography and obscenity; political speech and organizations; journalism and its restrictions; involuntary commitment laws; and many more.
 * If you want to indent a paragraph that includes single line breaks, you first have to remove them.
 * If you want to make a list item out of a paragraph that includes single line breaks, you first have to remove them.
 * If you want to turn a phrase that contains a line break into a link, or format it in bold or italics, you have to remove the line break first.
 * Many readers expect line breaks only where there is a logical, semantic break. Line breaks in source text will make them pause and search for such a break, and be frustrated when there is none. Consider this example:
 * The consequences of this Amendment to American society have been profound. First Amendment questions have been raised with regard to the separation
 * The appearance of the article source text becomes different from the appearance of the rendered output; it therefore becomes harder to find a sentence of the rendered output in the source text. Since writers often think in terms of paragraphs, it makes sense to organize the text that way.
 * Single line breaks in source texts may confuse new editors, who may think they are there for a special reason, and avoid editing these paragraphs because they fear they will break something.
 * Single line breaks in source texts may confuse new editors, who may think they are there for a special reason, and avoid editing these paragraphs because they fear they will break something.

Proponents of line breaks within paragraphs claim that they make diffs (the reports showing the differences between two revisions of an article) easier to read. The diff feature highlights the changes within each line break delimited block of text and provides unchanged text for additional context up to the third line break below and above that text. This usually means that it highlights the entire paragraph, and shows one paragraph above and below it for context. The changed characters are separately highlighted from the changed blocks in a different color.

It is hard to see how individual line breaks help in any way in that comparison, since their only effect will be to reduce the amount of context provided when a line is changed. In fact, arbitrarily entered line breaks prevent the software from working correctly: instead of providing the context of a full paragraph, it only shows changes in individual lines of text, respecting not even sentence boundaries.

One undeniable advantage of line breaks within paragraphs is that many Unix editors do not handle long lines well – they can either wrap characters at the screen boundary, wrap words at a fixed length, or not wrap at all. However, by this logic, line breaks would have to be entered at a fixed width, such as 80 characters, something which most proponents of the "use single line breaks" rule do not want and which, as seen above, completely breaks the diff context feature. Just inserting line breaks into some paragraphs will not make them easier to edit with these tools. Arguably, those who use editors which cannot handle long lines properly should just get better ones. Microsoft Notepad has had this functionality since its very first version, Gedit has it, vi supports it with the "set lbr" option, and every major graphical web browser has proper word wrapping even on Unix platforms.

Use single line breaks
Use frequent manually entered hard line breaks within paragraphs when editing the source code of articles, at least at the end of every sentence, but also in other places as needed. Manually entered hard line breaks arguably make the article much easier to edit when the lines of input text are short. (The "source code", "wiki text", or "input text" is what editors see and change in the text box of the "edit this page" form; the displayed text is what is shown to the reader.)

One benefit is that the line breaks make diffs smaller and (arguably) easier to read, and this was especially true before the changes to the styling of diffs made in 2012. In addition, if there is a line break at least at the end of every sentence, editors can easily locate, rearrange, or modify sentences within a long paragraph. Since writers often think in terms of sentences, it makes sense to organize the text that way. This section of the article, for instance, is broken into multiple lines, largely at clause boundaries.

The article on Steaming is one good example on how the diff algorithm fails miserably. The "very minor" changes dated 03:48, January 19, 2006, by user 64.69.92.30 in the revision history, show how the minor changes failed to show up as what they actually are because the minor changes to consecutive paragraphs throw diff totally off base. It would have avoided such a big mess if the paragraphs were broken into one line per sentence, as diff would have found consecutive identical sentences.

Finally, a rebuttal of many of the above points:


 * MediaWiki software does not allow line breaks in the middle of a paragraph indented with ":", but paragraphs that should be indented are generally shorter than other paragraphs.
 * MediaWiki software does not allow line breaks in the middle of a list item, but items in a bulleted list (using "*") or numbered list (using "#") are generally shorter than paragraphs. In fact, it is easier to convert the individual sentences of a properly line-broken paragraph to list items or vice versa.
 * MediaWiki software does not allow line breaks in the middle of a link, but linked phrases generally do not start in one clause and end in another.
 * Many editors insert line breaks into the source code only where there is a logical, semantic break. Consider this example:
 * The consequences of this Amendment to American society have been profound. First Amendment questions have been raised with regard to the separation of church and state; civil rights issues; pornography and obscenity; political speech and organizations; journalism and its restrictions; involuntary commitment laws; and many more.
 * Text is no longer wrapped only at the window edge of the text entry area, but where the author chose to make the linebreak. Thus, there will be a lot of whitespace within a paragraph, which reinforces the semantic breaks.
 * The appearance of the article source text has always been different from the appearance of the rendered output. For example,  contains brackets, but it is rendered as line break, which does not.