Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Markdown no break (nobr)?

Tags:

I've got a phone number in my markdown that tends to break over the end of the line. In HTML I could wrap it in a <nobr> tag to have it keep together properly. What is the correct way to do this in markdown? screenshot of my problem

like image 851
Jephron Avatar asked May 18 '15 16:05

Jephron


People also ask

How do you stop a line break in Markdown?

There are a few different methods to enforce a line break in the same paragraph in Markdown syntax: HTML's <br /> , backslash and double space.

How do you add breaks in Markdown?

To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return. This is the first line.

How do I force a no line break in HTML?

The <nobr> HTML element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.

How do you prevent a line break in CSS?

The white-space property has numerous options, all of which define how to treat white space inside a given element. Here, you have set white-space to nowrap , which will prevent all line breaks.


2 Answers

Apparently I didn't realize you could just embed html in markdown.

<nobr>[1-111-111-1111](tel:11111111)</nobr> 

works fine

like image 116
Jephron Avatar answered Oct 01 '22 09:10

Jephron


You can use non-break hyphen character ( &#x2011; )

1&#x2011;111&#x2011;111&#x2011;1111 

for

1-111-111-1111 

Or you could need the phone number format with spaces in between, then use no-break space character ( &#160; )

1&#160;111&#160;111&#160;1111 

for

1 111 111 1111 
like image 34
mahish Avatar answered Oct 01 '22 11:10

mahish