Don't line break in paragraphs, unless in block quotes?
When I write markdown I like to limit myself to 80 characters per line. This means that for long single words like links, I frequently will have a single word on its own line. It disrupts things like poetry, however. For example:
At home made [Mario Batali's Penne
all'Arrabbiata](https://cooking.nytimes.com/recipes/1015236-mario-batalis-penne-allarrabbiata).
I added a few modifications of my own based on the comments.
> How now
> Brown cow
> How now
> Oh I'm sorry you're a sheep
By default, this leads to some wonky line breaks in paragraphs (see attached) where "all'Arrabbiata" is on its own line. The verse is how I want, however, with each line on a physical new line.
If I turn off "Retain line breaks in paragraphs", the text is correct but the poem is not what I want, now being all in one line (also attached).
Is there a way to force line breaks for things like poetry in block quotes, but keep it in paragraphs? I can add a <br>
after each line in the poem, but that is a big change. I can also add a blank >
between each line, but that outputs extra spaces. Does anyone have any other suggestions? Marked is behaving how I want it to, so it's certainly not a bug. I'm more trying to figure out if there is a better way to force line breaks that I am missing.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 22 Mar, 2017 03:38 PM
A double space at the end of a line forces a line break in Markdown.
Block quotes contain paragraphs, so that's required. What you want,
though, is a verbatim block, which would normally be considered a "code
block" but has the effect you're looking for. If you go to Style
preferences and make sure that code highlighting is turned off, then
turn on "Style verbatim blocks as poetry," you should get the effect
you're looking for with no extra work. You'd just surround your verses
with either triple backticks or just indent them by 4 spaces (or 1 tab).
-Brett
2 Posted by Sam on 22 Mar, 2017 04:30 PM
Ah, fantastic. I need to keep code highlighting on for coding purposes, but the double trailing spaces trick is a great middle ground.
Thanks!