Re: [sphinx-users] Could not lex literal_block as "cpp"
Thanks: It appears that my system has automatically upgraded to pygments 2.13.0 and the problem is no longer there. On Sunday, November 27, 2022 at 9:47:16 AM UTC-7 je...@abou-samra.fr wrote: > > > Le 16/11/2022 à 22:54, bradley...@gmail.com a écrit : > > 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. > > -- > > > > This is a bug that was fixed in recent versions of Pygments. Try upgrading > (python3 -m pip install --upgrade pygments). > > > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/bdd2edbf-b1d2-40dc-8270-94543d23e340n%40googlegroups.com.
Re: [sphinx-users] Could not lex literal_block as "cpp"
Le 16/11/2022 à 22:54, bradley...@gmail.com a écrit : 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. -- This is a bug that was fixed in recent versions of Pygments. Try upgrading (python3 -m pip install --upgrade pygments). -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/b8702a96-510b-864c-3542-3119cb2d414f%40abou-samra.fr. OpenPGP_signature Description: OpenPGP digital signature
[sphinx-users] Could not lex literal_block as "cpp"
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. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/6afbb6eb-33ad-45c5-a22b-a98d2fc7236fn%40googlegroups.com.