witheve / Eve

Better tools for thought
http://witheve.com
Apache License 2.0
7.16k stars 257 forks source link

Parser exception on incomplete "search" keyword #851

Closed btheado closed 7 years ago

btheado commented 7 years ago

Code block with typo on the search keyword:

searc

results in parser exception:

Cannot read property 'length' of undefined

btheado commented 7 years ago

I no longer get a parser exception for this. Maybe https://github.com/witheve/Eve/pull/848 fixed it?

joshuafcole commented 7 years ago

Yep! Turns out the problem had the same underlying cause. For a class of errors that rendered the rest of the document unparsable, there was no token after to use for position information, which let NaN's into the system that generally wreaked havoc on error reporting. I added sanity checks in #848 to turn that case into "mark the whole block as the error".