Search code examples
markdownpagedown

Markup for an Email Signature or Postal Address in Markdown


Using pagedown/standard markdown, is there a way to mark up a postal address or email signature block so that it doesn't fold into a single line?

e.g.

First Lastname
Some Company
2041 Smile Rd
New York, NY
(999) 999-8888

If I leave it as - is like below, it folds to one line. adding an extra line feed wraps each line in paragraph tags.

How can I mark it up so that it displays like above?


Solution

  • The Markdown Syntax Rules simply state:

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

    For illustrative purposes, the following example has all spaces replaced by middle dots (·):

    First·Lastname··
    Some·Company··
    2041·Smile·Rd··
    New·York,·NY··
    (999)·999-8888
    

    Which results in the following HTML:

    <p>First Lastname <br />
    Some Company <br />
    2041 Smile Rd <br />
    New York, NY <br />
    (999) 999-8888</p>
    

    And displays as:

    First Lastname
    Some Company
    2041 Smile Rd
    New York, NY
    (999) 999-8888