fix null reference on empty cell. fixes #14#21
fix null reference on empty cell. fixes #14#21phromo wants to merge 1 commit intonikitakit:masterfrom
Conversation
|
I've verified this fixes the issue with no other bugs using the latest atom (1.30.0) |
|
For reference, the latest Atom is 1.32.1 |
|
Thank you for looking into this! I can reproduce the issue when there is a trailing code cell separator on the last line of the file. Having Might it be more appropriate to patch Hydrogen instead? |
|
I had the same line of thought as you but got no hydrogen error when disabling (1.30). I guess creating an issue at hydrogen might be worth a shot - but easier to see the consequences in your plugin. For hydrogen I'm unsure of my standpoint. I think having empty cells is something that would be needed anyway since the user can produce them.. The question for hydrogen is whether empty cells should be left as is (null), filtered (deleted) or changed to the empty string. Deleting cells feels like an extreme that might break other assumptions when it comes to drawing (ie showing the evaluated checkmark). So imho it should be either null or empty string, and since it is currently null.. Why change it |
|
@nikitakit It would probably be good to post an issue about that on Hydrogen. |
if the file contains a trailing code block marker (
# %%) there will be an empty cell passed to execute with code null. This seems to be the expected behaviour from hydrogen since it explicitly adds a cell ending at file ending.