-
-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing zero in front of numbers breaks code display and syntax highlighting #887
Comments
Syntax highlighting in Jupyter is done by CodeMirror, not the IJulia package (which just provides the backend kernel), so you should report the problem there. |
i'm experiencing this problem with Julia 1.4 and Julia 1.5-rc1 on my mac |
The problem was fixed in CodeMirror, and Jupyter was recently updated to use a more recent CodeMirror release, which should fix the bug: jupyter/notebook#5469 However, you may have to wait until Jupyter 6.1.0 is released and incorporated in to the Conda package; otherwise, the only way to get it seems to be to use There might be a way to upgrade codemirror manually somehow, though? |
Probably not a good solution, but I just replaced To find |
We used to have to update codemirror ourselves, which we actually used to do in early versions. In particular, if you are using the Conda installation of Jupyter (the default on Mac and Windows) you could do something like: using Conda
highlighter = joinpath(readchomp(Conda._set_conda_env(`$(joinpath(Conda.PYTHONDIR, "python")) -c "import site; print(site.getsitepackages()[0])"`)), "notebook", "static", "components", "codemirror", "mode", "julia", "julia.js")
if isfile(highlighter)
cm_commit = "772d09e697612889ec5dbed2cc058e754232c29d" # v5.56.0
highlighter_url = "https://raw.githubusercontent.com/codemirror/CodeMirror/" * cm_commit * "/mode/julia/julia.js"
download(highlighter_url, highlighter)
end Update: this fixes the problem for me. |
Minimal example
This is the console dump from Chrome:
IJuliaZeroBugChrome.log
Breaking Strings
Non-breaking Strings
Python Notebooks
Nothing breaks in a Python Notebook.
Versions
[7073ff75] IJulia v1.20.2
Tested with Firefox 71.0b9 and Chrome 78.0.3904.97
The problem appeared after I did a complete update-run of my Python install (lots of things) and Julia (1.1.1 -> 1.2.0 complete reinstall), so it's hard to trace the origin.
Notebook from minimal example
The text was updated successfully, but these errors were encountered: