Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-breakable inline code block in markdown document

Tags:

html

css

markdown

I have words delimited by dashes inside of inline code block. And I don't want the browser to break them. I searched for the solution and found that there is a non-breaking hyphen ‑. But when I try to put it between backquotes markdown translates & into & and the magic doesn't work.

So, is there any simple method to make markdown's inline code block non-breakable?

like image 552
rexim Avatar asked Nov 01 '22 08:11

rexim


1 Answers

If ‑ doesn't work with the markdown editor, you could always use white-space:nowrap.

span { white-space:nowrap; }

Example usage:

<span>Words-with-hyphens</span>

jsFiddle example

like image 110
Josh Crozier Avatar answered Nov 15 '22 11:11

Josh Crozier