Suppose the following file is named soruce/temp.cpp:
double f(
double x // '(x)
)
{ return x; }
If I put the following command in my sphinx-quickstart source/index.rst file below the toctree command:
.. literalinclude:: temp.cpp
:language: cpp
and I execute the following command
sphinx-build -b html source build
I get the following error message
... sphinx/source/index.rst:14: WARNING: Could not lex literal_block as "cpp". ...
If, in temp.cpp, I change the '(x) to (x) , the warning goes away and the file gets highlighted. It seems to me this change should not make any difference because it is inside a C++ comment.