• tal
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    19 hours ago

    In Markdown, you want to put two spaces at the end of a line if you don’t want it to be treated as a single rewrapped line.

    So:

    foo
    bar
    

    Gives

    foo bar

    And with two spaces after “foo”:

    foo
    bar

    I generally use bulleted lists instead to make it clear that it’s a list.

    * *00: Space Marine*
    * *Call of Duty: Black Ops*
    

    Gives:

    • 000: Space Marine
    • Call of Duty: Black Ops
    • slimerancher@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      Oh, thanks for the info. I always add two lines when I want a line break, didn’t know you can add two spaces at the end!

      • tal
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 days ago

        The blank line between the two actually – well, I suppose some clients might act differently than others, but certainly in the Web UI on lemmy and IIRC Reddit – produces a different effect, has a larger horizontal space, and is intended to be a paragraph break rather than just a line break.

        foo  
        bar
        

        (with two spaces trailing “foo”) Gives:

        foo
        bar

        And

        foo
        
        bar
        

        Gives:

        foo

        bar

        It’s not normally a massive difference, but suppose you’re writing poetry, say, you’d probably rather have paragraph breaks between verses and line breaks after each line in a verse:

        Stopping by Woods on a Snowy Evening

        Whose woods these are I think I know.
        His house is in the village though;
        He will not see me stopping here
        To watch his woods fill up with snow.

        My little horse must think it queer
        To stop without a farmhouse near
        Between the woods and frozen lake
        The darkest evening of the year.

        He gives his harness bells a shake
        To ask if there is some mistake.
        The only other sound’s the sweep
        Of easy wind and downy flake.

        The woods are lovely, dark and deep,
        But I have promises to keep,
        And miles to go before I sleep,
        And miles to go before I sleep.