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

Option to not format double curly braces (mustache)? #98

Closed
xerroxcopy opened this issue Jul 2, 2020 · 6 comments · Fixed by #100
Closed

Option to not format double curly braces (mustache)? #98

xerroxcopy opened this issue Jul 2, 2020 · 6 comments · Fixed by #100
Assignees
Labels
type: feature request Functionality that introduces a new feature

Comments

@xerroxcopy
Copy link

Request / Idea

I'm using Stein for a very simple website together with pug. Stein Expedite allows users to use column-names directly in HTML, as in {{colname}}. However, prettier seems to format this into {{ colname }} even when bracketSpacing is set to false. And Stein does not work if formatted that way. Is this possible, or am I doing something wrong / missing something?
My .prettierrc.js looks like below:

module.exports = {
  singleQuote: true,
  semi: false,
  overrides: [
    {
      files: '*.pug',
      options: {
        parser: 'pug',
        bracketSpacing: false, // for stein expedite
      },
    },
  ],
}

Input

div(
  data-stein-url='https://api.steinhq.com/v1/storages/[spreadsheet]/[sheet-name]',
  data-stein-limit='100'
) 
  div {{date}}

Expected Output

exactly the same as input.

@Shinigami92 Shinigami92 added the type: feature request Functionality that introduces a new feature label Jul 2, 2020
@Shinigami92 Shinigami92 self-assigned this Jul 2, 2020
@Shinigami92
Copy link
Member

Maybe I will try to fix this this weekend, but don't know I have time
But currently there is a audit vulnerability in lodash that is blocking my CI

@Shinigami92
Copy link
Member

@xerroxcopy Can you give me more examples for testing purposes?

IMO it should be more then just text-tokens 🤔

@xerroxcopy
Copy link
Author

Sorry for the late response. As far as Svelte goes, text should be enough. Not sure of other possible examples though...

@Shinigami92
Copy link
Member

Sorry for the late response. As far as Svelte goes, text should be enough. Not sure of other possible examples though...

Oh interesting info that you are using Svelte
I'll add a new label for this framework

@Shinigami92 Shinigami92 added the framework: Svelte Related to the framework Svelte label Jul 17, 2020
@Shinigami92
Copy link
Member

I will now release a version 1.5.0
Thank you for being in the pug community and using my plugin 🎉

@xerroxcopy
Copy link
Author

Thank you so much, i've just updated it and it works perfectly! and i'm sorry i meant stein, not svelte... my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Functionality that introduces a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants