The spec currently uses hard/soft line break terminology in the reverse of Gruber’s use. First, let me note this paragraph from Gruber’s syntax page:
The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a
<br />
tag.
That paragraph has confused me for years. He’s saying that Markdown supports “hard-wrapped” text by not obeying the line breaks the writer inserts (which would require a <br>
tag in the HTML output.) It always seemed like someone was playing a game of saying the exact opposite of what they meant.
I now realize that he was time-traveling. There is a temporal conflation in how a lot of people in the Markdown community have been talking about line breaks. Time 1 is the time of writing. Time 2 is the rendering of the output (for reading). When Gruber talks about hard-wrapped text, he means the writer hitting the Enter
key and “hard-wrapping” the text for their own fleeting purposes. He means Markdown supports hard-wrapping at Time 1, while obliterating it in the rendered output at Time 2.
This temporal conflation and ambiguity came up in this discussion on this forum. There’s enormous confusion about what hard and soft line breaks mean.
The spec, section 6.9, reads:
A line break (not in a code span or HTML tag) that is preceded by two or more spaces and does not occur at the end of a block is parsed as a hard line break (rendered in HTML as a
<br />
tag)
Gruber spoke of hard-wrapped text as that which would not generate a <br>
tag. Here we are using “hard line break” to mean an entity that does yield a <br>
tag in the HTML. He meant a hard line wrap for the author to look at in their source text (T1), while we mean a hard line break in the output (T2).
(I assume wrap and break can be taken as equivalent here.)
Should we strive to match his usage? At the least I think we should clarify the difference between writer-pressing-Enter
line breaks vs. breaks in the rendered output.
I also suggest making the spec’s sentences here simpler and more direct by saying “A soft/hard line break is…” as opposed to the long-winded passive voice form where the subject comes at the end of the sentence (as in the quote from section 6.9 above.)
Afterword: From the long discussion/debate here about what the default line-breaking behavior should be (linked above), I think lots of people will be confused by the paleo-Markdown norm of obliterating the user’s line breaks (as learned by GitHub.) Many Markdown norms seem driven by a distinct subculture that may be waning. For example, I have no idea why I would hard-wrap text in an editor if I didn’t want it to be hard wrapped in the end – editors have automatic soft-wrapping, so why hard-wrap? There’s something about the Unix-like OS experience that I missed. Also, I submit that the frequent references saying that Markdown is just like e-mail format probably make sense to far fewer people in 2015/16 than they did in 2004. I’ve never written e-mails in this rumored e-mail format – Gmail, Outlook, Thunderbird et al. have had rich text for decades. Luckily, we only have one “like e-mail” reference in the spec – I’m just suggesting that we not count on such references moving forward.