Markdown no break (nobr)?

I have a phone number in my markdown that tends to break above the end of the line. In HTML, I could wrap it with a <nobr> tag so that it is stored together. What is the right way to do this in markdowns? screenshot of my problem

+6
source share
3 answers

Apparently, I did not understand that you can just embed html in markdowns.

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

works great

+6
source

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

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

for

 1-111-111-1111 

Or you may need a phone number format with spaces between them, then use the space character without a space ( &#160; )

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

for

 1 111 111 1111 
+6
source

The "nobr" tag is non-standard HTML, and although it is supported by browsers for legacy purposes, the correct way is to handle it with CSS.

CSS equivalent:

 .nobr { white-space:nowrap; } 
0
source

Source: https://habr.com/ru/post/987428/


All Articles