microsoft / gather

Spit shine for Jupyter notebooks 🧽✨
https://microsoft.github.io/gather
MIT License
532 stars 38 forks source link

Parser does not correctly set this.indents = [0] when this.indents is undefined #18

Closed joyceerhl closed 5 years ago

joyceerhl commented 5 years ago

Describe the bug In python3.jison on line 69, this.indents is incorrectly set. This corresponds to line 1064 in the generated python3.js file.

if (this.indents == undefined) this.indents == [0]; // should be this.indents = [0]

This causes the parser to throw a TypeError: Cannot read property 'length' of undefined at Object.anonymous [as performAction] on the next line when the parser attempts to access this.indents.length:

if (this.indents.length > 1) {
andrewhead commented 5 years ago

@joyceerhl is this fixed as of the merged pull request https://github.com/microsoft/gather/pull/19?

joyceerhl commented 5 years ago

Yep!