htmlmarkdownline-breaks

Markdown no break (nobr)?


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


Solution

  • 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