github / markup

Determines which markup library to use to render a content file (e.g. README) on GitHub
MIT License
5.86k stars 3.4k forks source link

Inline <code> elements should use white-space: nowrap styling #1505

Open dmartin opened 3 years ago

dmartin commented 3 years ago

When using single-backtick inline code elements, one is almost always writing the name of a variable or a command line invocation that should be treated as a single token and not split across multiple lines.

Here are some examples where adding white-space: nowrap; to rendered inline <code> elements greatly improves readability, reduces confusion, and simplifies copy & pasting:

Before:

Screen Shot 2021-10-12 at 12 51 35 PM

After:

Screen Shot 2021-10-12 at 12 52 39 PM

Before:

Screen Shot 2021-10-12 at 12 59 41 PM

After:

Screen Shot 2021-10-12 at 1 00 14 PM
lczech commented 1 year ago

Agreed, this is making my GitHub wiki hard to read at times. Using nowrap would greatly improve this! I tried messing around with <style> myself, but that is all ignored/sanitized by GitHub Markdown :-(

If anyone has a quick fix on how to solve this locally for GitHub wikis, please share :-)

github-actions[bot] commented 1 month ago

Stale issue message

lczech commented 1 month ago

I'm still interested in that, please don't close the issue, dear bot :-)