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

[FEATURE] Lexer: Return call/mixin args string[] instead of string #3214

Open
Shinigami92 opened this issue Feb 9, 2020 · 0 comments
Open

Comments

@Shinigami92
Copy link
Contributor

Pug Lexer Version: ~4.1.0 - package.json#L31

Node Version: v13

Input Pug

// https://pugjs.org/language/mixins.html#rest-arguments
mixin list(id, ...items)
  ul(id=id)
    each item in items
      li= item

+list('my-list', 1, 2, 3, 4)

The lexer returns a call or mixin token with args
args can be null or string
In the above example: "'my-list', 1, 2, 3, 4"

Now I tried to split this by , (prettier/plugin-pug#66 (comment))
But the problem is, that it also can contain json that has by itself commas
And that breaks my formatter :(
So I need a string[] instead

['my-list', 1, 2, 3, 4]

@Shinigami92 Shinigami92 changed the title [FEATURE] Lexer: Return string[] instead of string [FEATURE] Lexer: Return call/mixin args string[] instead of string Feb 9, 2020
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

1 participant