Don't line break in paragraphs, unless in block quotes?

Sam's Avatar

Sam

22 Mar, 2017 03:14 PM

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.

  1. Support Staff 1 Posted by Brett on 22 Mar, 2017 03:38 PM

    Brett's Avatar

    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. 2 Posted by Sam on 22 Mar, 2017 04:30 PM

    Sam's Avatar

    Ah, fantastic. I need to keep code highlighting on for coding purposes, but the double trailing spaces trick is a great middle ground.

    Thanks!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Screen_Shot_2017-03-22_at_8.08.54_AM.png 82.7 KB
  • Screen_Shot_2017-03-22_at_8.10.15_AM.png 71.5 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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