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

Number of characters in methods causing errors in parser #15

Open
kaisucode opened this issue Feb 7, 2021 · 1 comment
Open

Number of characters in methods causing errors in parser #15

kaisucode opened this issue Feb 7, 2021 · 1 comment
Assignees

Comments

@kaisucode
Copy link
Collaborator

This block of code

foo = schools-table.filter(is-public)
.filter(is-hs)
.build-column("aaa-cccccc", aaa-ccc)
.build-column("aaa-bbb", aaa-bbb)

Results in an error of

pretty.js: The `txt` function does not accept text with newlines, but was given: schools-table.filter(is-public).filter(is-hs).build-column(
  "aaa-cccccc", aaa-ccc
).build-column

Even when inputted as a single line, the exact same error message appears.
At first we thought this might be an issue with the numerous dash characters in the code conflicting with the syntax parser.

However, we realized that removing a "c" from either the string or the variable name renders fine.

foo = schools-table.filter(is-public)
.filter(is-hs)
.build-column("aaa-ccccc", aaa-ccc)
.build-column("aaa-bbb", aaa-bbb)

It doesn't necessarily have to be a "c", but this seems to be related to the number of characters somehow.

Removing even just one character from the words "schools-table", "is-public", "is-hs", or the parameters of the first build-column renders, but changes to the parameters of the second build-column still errors.

(This is most likely due to the contents of the second build-column being the only one recognized as parameters, elaborated more on this issue here.

Side note: Replacing all the dashes with non-dash characters has the same results, so this shouldn't be an issue about dash characters.

@schanzer
Copy link
Member

This is almost certainly a similar bug to #16 , though not fixed by the same mechanism. Somewhere, horizontal pretty-printing is being fed something incorrect.

CMB should really watch for these, and blame the language module for not pretty-printing properly.

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

3 participants