I'm currently working on a user complaint, and I can't figure out whether the complaint is an actual bug or not. Basically, the user says there is a problem with the website because blockquotes do not preserve his new lines. This sounds reasonable, but on every markdown tester I've tried online, blockquotes are rendered the same as mine. For example:
hi what's up? this is my multiline blockquote.
Even though I type this as a multiline quote, the newlines are still lost in rendering (even on StackOverflow). So I guess my real question is two-fold:
I'm 99% sure by this point that blockquotes should not preserve newlines, but I'd still like to see if there are differing opinions just in case. Do any of you think they should preserve them?
If they shouldn't preserve them, is the proper way to have your new lines preserved in markdown simply by using pre and code?
To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return. This is the first line.
For an empty line in Markdown, escape a space ( \ ), and then add a new line. Remember: escape a space and escape a new line. That way is Markdown compliant and should compile properly in any compiler.
The original markdown 'specs' are highly ambiguous and not maintained. There is of course the perl script markdown.pl
, the 'reference implementation', though it has many familiar oddities.
You might join the list http://six.pairlist.net/pipermail/markdown-discuss/ which is forever complaining about the contradictory situation the matter is in due to Gruber's corruption. Perhaps the list users will have the sense to take the matter into their own hands, though the subtle differences between the different implementation and the not-so-subtle differences between the different extensions make this unlikely, or anyway difficult. -Especially so long as Gruber does not renounce all rights in the matter but at the same time advances no specification. If a committee formed, it would not be able to speak of any specification as a specification of Markdown.
In principle it is clear that block quotes are governed by the same principles as non-block quotes - for example you can have block quotes in block quotes -- so you friend is certainly wrong. You can prove this to your user by running markdown.pl
on his or her text. Any other principle would be total confusion. Note this,
the rule for making a line-break
with extra spaces at the end of the lineis totally clear
whether insideor outside
block quotes, so you might explain it to him or her.
Note that the stackoverflow markdown parser is good here (I noticed something wrong with the way you exit a nested block quote to return to the main block quote, though.) But the author of the css quite wrongly made the space between a block quote and the surrounding text greater than that between paragraphs. This is nonsense where paragraph breaks are communicated by extra space. A block quote is part of the paragraph, indeed typically of a sentence. It is akin to a very long single word, like any other quotation you use in writing.)
Note that what is in the cute, cloying jargon calling itself "GitHub™ flavored markdown" treats all newlines - outside code blocks etc. - as paragraph breaks, a decision which basically makes the idea of markdown non-existent. It may be your user is familiar with some such thing - though at least it doesn't break the rule that what holds in the block quote is what holds outside it. GitHub Inc. has ... uh ... 'convinced' Gruber that this is a legitimate markdown 'for their use case'. The ground for this was that untutored people might naturally think that a newline makes a paragraph break. Gruber was presumably aware that GitHub™'s user-base is constituted by programmers so this shows how much worth the idea of a specification or standard has for him. Of course it has produced total chaos for complex documentation on GitHub. (Why shouldn't there be "legitimate html for Internet Explorer's use case"; a lot of people just test stuff in IE, so they have certain legitimate expectations? Of course, GitHub's decision is much worse than anything like that would be.)
I haven't thought about this for a while so these remarks might not be up to date, but I doubt things have changed since I decided not to think about it. That there is and will be no specification shows that each minute you devote to thinking about the matter is wasted human energy. Markdown has engendered quite a bit of that by now, thanks to Gruber's meretriciousness.
add <br>
to where you want to have a line break in your quote block.
normally, appending 2 spaces should do the same thing, but most ide will trim the trailing spaces, which is actually a good behavior!
> hi what's up?<br>this is my multiline blockquote.
hi what's up?
this is my multiline blockquote.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With