Skip to content

Number of characters in methods causing errors in parser #15

@kaisucode

Description

@kaisucode

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions