How to add new line in Markdown presentation?

前端 未结 10 1267
旧巷少年郎
旧巷少年郎 2020-12-07 12:41

How to add new line in Markdown presentation?

I mean, something like \\newline in TeX.

相关标签:
10条回答
  • 2020-12-07 13:35

    Just add \ at the end of line. For example

    one\
    two
    

    Will become

    one
    two
    

    It's also better than two spaces because it's visible.

    0 讨论(0)
  • 2020-12-07 13:36

    If none of the solutions mentions here work for you, which is what happened with me, then you can do the following: Add an empty header (A hack that ruins semantics)

    text
    ####
    text
    

    Just make sure that when the header is added it has no border in bottom of it in the markdown css, so you can try different variations of the headers.

    0 讨论(0)
  • 2020-12-07 13:40

    See the original markdown specification (bold mine):

    The implication of the “one or more consecutive lines of text” rule is that Markdown supports “hard-wrapped” text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type’s “Convert Line Breaks” option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    0 讨论(0)
  • 2020-12-07 13:40

    MarkDown file in three way to Break a Line

    <br /> Tag Using

    paragraph First Line <br /> Second Line
    

    \ Using

    First Line sentence \
    Second Line sentence 
    

    space keypress two times Using

    First Line sentence␠␠
    Second Line sentence
    

    Paragraphs in use <br /> tag.

    Multiple sentences in using \ or two times press space key then Enter and write a new sentence.

    0 讨论(0)
提交回复
热议问题