Markup for an Email Signature or Postal Address in Markdown
Asked Answered
I

2

6

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?

Ingles answered 12/1, 2016 at 4:46 Comment(0)
J
13

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

Jonijonie answered 12/1, 2016 at 16:18 Comment(0)
B
1

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.

Barred answered 12/1, 2016 at 4:52 Comment(1)
This will work for sure, but I was hoping there was a more user-friendly solution for the non-technical usersIngles

© 2022 - 2024 — McMap. All rights reserved.