Skip to content
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

Parse error in LEO file: better reporting, why did it happen? #12

Closed
metaperl opened this issue Nov 24, 2019 · 2 comments
Closed

Parse error in LEO file: better reporting, why did it happen? #12

metaperl opened this issue Nov 24, 2019 · 2 comments

Comments

@metaperl
Copy link

I attempted to deploy Leo to a github-pages site and got a blank screen. Using the inspector, I found the following parse error:

leo.js:342 Uncaught (in promise) SyntaxError: Unexpected token 	 in JSON at position 332
    at JSON.parse (<anonymous>)
    at leo.js:342

The file that created the parse error is here:
https://github.com/metaperl/being-doing-having/blob/master/docs/parse-error.leo

it would be nice if parse errors were more prominently fed back to the end user.

@kaleguy
Copy link
Owner

kaleguy commented Nov 26, 2019

This is interesting, turns out LeoVue can't handle tabs in the node titles. You have a tab in the title "Isolation-Tank-Gnosis". Remove that and LeoVue can load your file.

I'll upload a fix for this soon. Also good point about error reporting, adding better error message for JSON parse errors.

Also, you have markdown in some of your nodes. To get LeoVue to format the markdown, add @language md to the first line of the node. Child nodes inherit directives, so this can be used to mark a subtree.

@kaleguy
Copy link
Owner

kaleguy commented Nov 27, 2019

Pushed a fix for this (tabs in node titles are stripped out) with some better error reporting on console. Will add an error message to UI in future.

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

No branches or pull requests

2 participants