Get rid of two spaces to indicate explicit linebreak in favor of backslash?

I think the backslash \ is the correct solution for hard line breaks and it should be the only option.

Please, get rid of the two-space line break in the spec. Don’t encourage people to use that abomination! To the obvious argument that you cannot edit what you cannot see, I’ll add that some editors remove trailing spaces in lines as a convenience (mine certainly does).

Regarding 6.10 Soft line breaks, I think it needs to be clarified that a conforming parser will not convert them to <br> by default.

Thanks for this great effort!

1 Like

Backwards compatibility is a compelling reason to keep the two-spaces in the spec. Also, some people like their documents to look pretty, and the two spaces are invisible. I think it’s a matter of personal taste.

My own preference would be to get rid of the backslash-newline line break marker, in favor of reST-style line blocks:

| 200 Rose St.
| Salmon, WA 23433

That looks much less like a computer language.

2 Likes

Thank you for your reply.

I actually like reST line blocks and I think they would be a great addition. But I think you still need a way to include the occasional line break in a regular paragraph, and the escape character seems the logical choice since you are actually escaping a “newline” character.

[quote=“jgm, post:16, topic:15”]
My own preference would be to get rid of the backslash-newline line break marker, in favor of reST-style line blocks:[/quote]

I’m in favour of this change. If line blocks are added, I can’t think of a reason that would require the writer to use a line break.

What is the semantic meaning of a mid-paragraph line break?

Whatever we choose as long as it is visible, we’re good. Invisible characters at the end of lines is a worst case scenario on so many levels…

tell me please
   <- can you see the spaces there

versus

tell me please
can you see the spaces there ->

And the old way still needs to work for backwards compatibility. Sorry @an3ss, we aren’t breaking trillions of existing documents because of your personal preferences. I mean, I like you, and all, but I like those trillions of existing Markdown documents a little bit more :wink:

1 Like

It’s already been/being discussed at length in this thread:
http://talk.commonmark.org/t/default-line-break-handling-is-inconvenient/280

@codinghorror I can live with that :wink:

And since line blocks are not in the spec yet, backslash line breaks are safe for now :slight_smile:

Maybe a thread on line blocks should be opened instead.

Very little, if any. But I can think of this example in a list item:

1. Apples
2. Oranges\
   ...

On the other hand, some people may find it more natural or convenient to write lines (verses, for example) with a final \ instead of a leadind |.

Anyway, it has to be decided first if line blocks are included in the spec or not.

I believe the intention is to add new features as official CommonMark extensions once the core is solidified.

I see, thank you.
I’m new here so I still need to catch up with so many things.

Thank you, @joallard. What I’ve understood from @codinghorror’s comments is that:

  1. Line breaks will not render a <br> by default (only with a parser switch)
  2. Backslash is the preferred alternative for explicit line breaks
  3. The two-spaces alternative will stay in the spec for backwards compatibility

And I guess this will apply to every script that has ever been used with Markdown, including Chinese :slight_smile:

 | 200 Rose St.
 | Salmon, WA 23433

That already “works” in many markdown processors, because it is a single-column table.

Hmm, I’m used to backslash changing the semantics of the following character.
There is no (visible) character following the backslash here.

In kramdown, a line break is created like this:

first line\\
second line

Arguments regarding familiarity with the backslash being used as a new line marker (particularly if you come from a programming background) are understandable. For me, what matters most is which is more readable.

This is the first line of a paragraph.\
Here's a second line.

or this?

| This is the first line of a paragraph.
| Here's a second line.

To me, there is no contest. The second is more readable and is “publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.”

+++ cabo [Jan 11 15 17:25 ]:

Hmm, I’m used to backslash changing the semantics of the following character.
There is no (visible) character following the backslash here.

Well, the way I think of it is that the backslash changes the semantics of the following character, which is a newline. Normally the newline is a soft break; the backslash makes it a hard break.

In kramdown, a line break is created like this:

first line\
second line

That’s a bad idea, I think: \\ already has a clear use as a backslash-escaped backslash, and it is confusing to give it a different role at the end-of-line position.

2 Likes