1

I have a documentation project that includes both Markdown (.md) and Sphinx RST (.rst) files. I noticed an issue with the text "C++"; the rendered text can line-break between the two plus signs:

Raw text (example):

If you are a Python programmer, you may be put off by C++ syntax. It takes a bit of 
practice, but soon you'll be reading both without a problem.

Displayed text (example):

If you are a Python programmer, you may be put off by C+
+ syntax. It takes a bit of practice, but soon you'll be
reading both without a problem.

In a .md file, I can use <nobr>C++</nobr>, but I understand that's not a recommended practice. In a .rst file, this does not work; the raw HTML is displayed.

Is there a standard, accepted way to prevent character breaks within a word in both Markdown or RST?

(Please don't respond with solutions that work only to embed non-breaking spaces or non-breaking hyphens. Those are already well-documented elsewhere.)

0 Answers0