Closed MRYingLEE closed 5 months ago
I found the direct reason.
In the previously created notebooks, the metadata for the notebooks are as follows:
{ "kernelspec": { "name": "xjavascript", "display_name": "JavaScript (xjavascript)", "language": "javascript" }, "language_info": { "codemirror_mode": "", "file_extension": "js", "mimetype": "text/x-javascript", "name": "javascript", "nbconvert_exporter": "", "pygments_lexer": "", "version": "ES6" } }
In the newly created notebooks, those are as follows:
{ "kernelspec": { "name": "xjavascript", "display_name": "JavaScript (xjavascript)", "language": "javascript" }, "language_info": { "name": "" } }
If I update the metadata of the newly created notebooks to the previous value, then the syntax highlights backs.
So far, I have no idea on the root reason.
The same issue happens in Xeus-Python also. So this must be a bug of Xeus.
might also be an issue with jupyterlite itself.
On the xeus/c++ side, kernelspec / kernel info sits here https://github.com/jupyter-xeus/xeus-javascript/blob/main/share/jupyter/kernels/xjavascript/kernel.json.in and here https://github.com/jupyter-xeus/xeus-javascript/blob/main/src/xinterpreter.cpp#L129
I don't remember 100% where on the javascript side this info is consumed, but probably somewhere in https://github.com/jupyterlite/xeus/
The issue disappeared in the latest version.
I tested in both Edge and Chrom and also in both normal and inPrivate(incognito) mode.
Thanks,
In the Vallina demo notebook and all newly created notebooks, syntax highlights were gone in code cells.
An example is as follows:
The previously created notebooks can show syntax highlights normally.
The same issue happened in both latest version of MS Edge and Google Chrome on Windows 11.
Please check. Thanks,