cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
358 stars 42 forks source link

throws error for \ce{\bond{~}} #56

Closed GaganpreetKaurKalsi closed 1 year ago

GaganpreetKaurKalsi commented 1 year ago

Throws error when trying to display partial bond.

image
arnog commented 1 year ago

Good catch. I suggest filing the issue again the mhchem parser: https://github.com/mhchem/mhchemParser

GaganpreetKaurKalsi commented 1 year ago

Hi @arnog ! Should I file issue here or on mhchem repo? As I guess the issue is with the in cortex. Could you elaborate a bit on the next steps?

arnog commented 1 year ago

Hi @GaganpreetKaurKalsi. The issue is not with cortex. As the console message indicate, this is an issue with the mhchem parser that doesn't handle a chemical equation made up of only one \bond{-} command. That's not a valid equation anyway, but since the author of mhchem is requesting to file an issue, I suggest you go to the mhchem parser repo and file and issue there.

GaganpreetKaurKalsi commented 1 year ago

Hi @GaganpreetKaurKalsi. The issue is not with cortex. As the console message indicate, this is an issue with the mhchem parser that doesn't handle a chemical equation made up of only one \bond{-} command. That's not a valid equation anyway, but since the author of mhchem is requesting to file an issue, I suggest you go to the mhchem parser repo and file and issue there.

Okay! Thanks for your reponse.