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, including inside tags #103

Closed
xerroxcopy opened this issue Aug 4, 2020 · 4 comments · Fixed by #104
Closed

Option to not format double curly braces, including inside tags #103

xerroxcopy opened this issue Aug 4, 2020 · 4 comments · Fixed by #104
Assignees
Labels
type: feature request Functionality that introduces a new feature

Comments

@xerroxcopy
Copy link

Request / Idea

The idea is almost identical to #98, but with extension to tags. I'm very sorry that I have missed your point at 'more than just text-tokens'. You were dead right. I actually needed double curly braces inside tags too. Example from Stein Expedite docs:

<div
  data-stein-url="https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40/Sheet1"
  data-stein-limit="2"
>
  <div>
    <h1>{{title}}</h1>
    <h6>By {{author}}</h6>
    <p>
      {{content}}
    </p>
    <p>Read on <a href="{{link}}">Medium</a></p>
  </div>
</div>

the {{link}} inside <a> should also be formatted as is, not as {{ link }}.

Input

a(href="{{link}}") Link

Expected Output

a(href="{{link}}") Link

Current behaviour

a(href="{{ link }}") Link
@Shinigami92
Copy link
Member

There they are, the test cases 😜

Sry for beeing a bit like MS Windows: Only add features and fix bugs that are found by users 😛

Hope I have time for this next hours/days

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

@xerroxcopy Are there any other parts that needs to be covered?
Pls have a look at https://github.com/prettier/plugin-pug/pull/104/files#diff-4f50bb302d1c998ef11b403520e97609

@xerroxcopy
Copy link
Author

I... guess that is enough, but to be bloody honest, I have no idea. Just as MS Windows users, what I can point out is what I only need right now :p I am very sorry. I won't use them as tag names (e.g., {{tag}}.class-one), I won't use them inside scripts, while others might. Still, I believe attributes is enough.

@Shinigami92
Copy link
Member

Released as 1.5.1
Have a nice weekend 👋

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