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 at line 2 column 35, expected "label" but got "[" #219

Open
jumangee opened this issue Mar 3, 2024 · 1 comment
Open

Parse error at line 2 column 35, expected "label" but got "[" #219

jumangee opened this issue Mar 3, 2024 · 1 comment

Comments

@jumangee
Copy link

jumangee commented Mar 3, 2024

Trying to render with:
nomnoml.renderSvg(code)
next code:

[<note id=id12735b4d7f8847b> 111]
[<note id=ide0d67858d04d774> 222]
[ide0d67858d04d774] --> [id12735b4d7f8847b]

receiving this error:

Error: Parse error at line 2 column 35, expected "label" but got "["
ParseError https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:918
error https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:902
parseAssociation https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:769
parseNodesAndAssocs https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:743
parsePart https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:715
linearParse https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:682
parse https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:927
parseAndRender https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:1709
renderSvg https://quest-book.ru/utils/uniarchedit/js/nomnoml.js:1725
render https://quest-book.ru/utils/uniarchedit/js/models/render/nomnoml.js:9
render https://quest-book.ru/utils/uniarchedit/js/models/render/nomnoml.js:8
parse https://quest-book.ru/utils/uniarchedit/js/models/generator/nomnoml.js:126

but code nicely renders in online app:
изображение

Using local nomnoml.js from github repo, but //unpkg.com/nomnoml/dist/nomnoml.js gives same error

What's wrong?

@skanaar
Copy link
Owner

skanaar commented Mar 11, 2024

I cannot reproduce this bug.

A html-dokument with this code works fine.

<script src="//unpkg.com/graphre/dist/graphre.js"></script>
<script src="//unpkg.com/nomnoml/dist/nomnoml.js"></script>
<script>
	var svg = nomnoml.renderSvg(`[<note id=id12735b4d7f8847b> 111]
[<note id=ide0d67858d04d774> 222]
[ide0d67858d04d774] --> [id12735b4d7f8847b]`)
	document.write(svg)
</script>

Which browser are you using? Are you at the latest nomnoml version 1.6.2?

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