You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In e.g. markdown, depending on what convention is used for spaces around em-dash, you can get different results after applying semantic line breaks. It seems that that dictates using spaces around em-dashes in the source. Perhaps this can be mentioned.
sentence-per-line, no em-dash spaces:
The food—which was delicious—reminded me of home.
The food, which was delicious, reminded me of home.
clause-per-line, inconsistent em-dash spaces:
The food
—which was delicious—
reminded me of home.
The food,
which was delicious,
reminded me of home.
I could instead use
sentence-per-line, em-dash spaces:
The food — which was delicious — reminded me of home.
and
clause-per-line, em-dash spaces:
The food
— which was delicious —
reminded me of home.
which render the same as each other and make the em-dash spacing situation consistent with the comma situation.
It's unfortunate that em-dashes without spaces don't work well with semantic line breaks. On the other hand, the specification recommends adding a line break after an em-dash:
A semantic line break SHOULD occur after an independent clause as punctuated by a comma (,), semicolon (;), colon (:), or em dash (—).
So yea, perhaps this should be clarified. I'm not sure how.
I personally use en-dashes surrounded by spaces and wrap my code like this:
The food –
which was delicious –
reminded me of home.
I think en-dashes with spaces read better on the web than em-dashes without spaces. The spec doesn't mention en-dashes at all – perhaps it should?
In e.g. markdown, depending on what convention is used for spaces around em-dash, you can get different results after applying semantic line breaks. It seems that that dictates using spaces around em-dashes in the source. Perhaps this can be mentioned.
sentence-per-line, no em-dash spaces:
clause-per-line, inconsistent em-dash spaces:
I could instead use
sentence-per-line, em-dash spaces:
and
clause-per-line, em-dash spaces:
which render the same as each other and make the em-dash spacing situation consistent with the comma situation.
Gist of four snippets, with rendering:
https://gist.github.com/goretkin/ab383aafaac4aa08d057b1c48fd196fd
(github issues use a flavor of markdown that does not support semantic line breaks)
The text was updated successfully, but these errors were encountered: