Not sure if this qualifies as an answer, but I think you should not care too much about this, because you can't completely prevent these kind of things happening. Perfecting your posts is commendable, but in this case your energy might be better spent elsewhere, e.g. finding and writing an answer to another question.
For a real-life example, this very morning, I was Googling for how to check the log of launchctl
. The first search result is a Server Fault answer and it's short enough that I don't need to navigate:

So I copy
sudo launchctl log level debug
and execute it, and then I copy
tail -f /var/log/system.log
and execute it. Or so I thought; since Google strips the formatting, that actually ended up being
tail -f /var/log/ system.log
thanks to the line break. The author of that question wisely chose a code block for their commands, but even that didn't help.
Alt
+Space
then typing
works as well.<code>...</code>
HTML tag, which I never use as I write lots of small code snippets. Every once in a while, that might be useful though.<code>
is still hyphenated at awkward positions. My question is about how to prevent hyphenation of in-line text/code. If there was something that could be done with HTML attributes in the<code>
tag, for example, that would be nice.<pre><code>...</code></pre>
.[![:print:]]
(or even one of them) would make the text confusing and unreadable.<br>
s to make it work but it’s going to look weird on other people’s displays.