Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 680
GWR Avatar asked Jan 12 '16 04:01

GWR


2 Answers

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

like image 53
Waylan Avatar answered Oct 05 '22 23:10

Waylan


I always (for this) take advantage that most Markdown parsers allow a alimitted subset of html. Including the <br> tag

So yours becomes:

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

Displaying as follows:

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

I am not aware of a pure Markdown solution, but I haven't really looked since the HTML way is so easy.

like image 27
Lyndon White Avatar answered Oct 06 '22 00:10

Lyndon White