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

Bug: singleQuote doesn't affect mixin parameters #332

Closed
2 of 7 tasks
wscherphof opened this issue Jan 21, 2022 · 1 comment
Closed
2 of 7 tasks

Bug: singleQuote doesn't affect mixin parameters #332

wscherphof opened this issue Jan 21, 2022 · 1 comment
Labels
type: duplicate This issue or pull request already exists

Comments

@wscherphof
Copy link

Plugin Version

1.19.2

Prettier Version

2.5.1

Which frameworks are affected?

  • none
  • vue
  • angular
  • svelte

Node Version

16

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Prettier config

{
  "singleQuote": true
}

Input

mixin form(method, action, target, push)
  - methodOverride = method != 'GET' && method != 'POST';
  - push = push ? 'true' : false;
  form(
    method=methodOverride ? 'POST' : method,
    action=action,
    hx-target=target,
    hx-push-url=push
  )&attributes(attributes)
    if methodOverride
      //- _method is from
      //- https://www.npmjs.com/package/fastify-method-override
      input(type='hidden', name='_method', value=method)
    block

mixin get(action, target, push)
  +form("GET", action, target, push)&attributes(attributes)
    block

Output or Error

✔️ strings in JavaScript code get singleQuote
✔️ attribute values get singleQuote
❌ mixin arguments remain double-quoted

Expected Output

✔️ mixin arguments get singleQuote as well

Additional Context

also, pugSingleQuote doesn't work - #174

@Shinigami92
Copy link
Member

Duplicate of #66

See #66 (comment)

@Shinigami92 Shinigami92 added the type: duplicate This issue or pull request already exists label Jan 21, 2022
wscherphof added a commit to wscherphof/fastify-htmxample that referenced this issue Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants