Skip to content

Fix error parsing latex_symbols.js from Julia. #1

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

Merged
merged 2 commits into from
Mar 20, 2021

Conversation

accidentalrebel
Copy link

@accidentalrebel accidentalrebel commented Mar 20, 2021

This fix makes sure that the code checks if whether each parsed line has a " character. Otherwise it skips it.

This is the first step to allow iPython to parse and update it's latex symbols. Related to ipython#12861.

Before this fix, an error occurs when gen_latex_symbols.py is called.

$ python3 gen_latex_symbols.py 
Importing latex_symbols.js from Julia...
Building a list of (latex, unicode) key-value pairs...
Traceback (most recent call last):
  File "/home/arebel/development/open-source/ipython/tools/gen_latex_symbols.py", line 42, in <module>
    x, y = x.split('"')[1], y.split('"')[1] # get the values in quotes
IndexError: list index out of range

This is caused by line 2629 of: https://github.com/raw/JuliaLang/julia/master/stdlib/REPL/src/latex_symbols.jl.

@mmulet mmulet merged commit 2dfdd63 into code-relay-io:master Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants