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

HTML properties incorrectly have there capitalization changed #235

Open
DanJBower opened this issue Jun 26, 2019 · 5 comments
Open

HTML properties incorrectly have there capitalization changed #235

DanJBower opened this issue Jun 26, 2019 · 5 comments
Labels

Comments

@DanJBower
Copy link

Describe the bug
Automatically changes the capitalization of properties in HTML. For example, *ngIf becomes *ngif. Notice the I vs the i.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new folder and open in VSCode. I called mine "UnibeautifyTest".
  2. Create a HTML file. I called mine index.html and it looks like the following.

:

<p>First name: {{ user.firstName }}</p>
<p>Surname: {{ user.surname }}</p>
<div *ngIf="user">
    <label>Enter First Name:</label>
    <input type="text"
        [(ngModel)]="user.firstName">
    <br>
    <label>Enter Surname:</label>
    <input type="text" [(ngModel)]="user.surname">
</div>

<h1>Hello, {{ user.firstName }} {{ user.surname }}</h1>`
  1. Hit f1, then type "Format Document With". Hit Enter
  2. Select UniBeautifier.
  3. The formatted file looks like

:

<p>First name:
  {{ user.firstName }}</p>
<p>Surname:
  {{ user.surname }}</p>
<div *ngif="user">
  <label>Enter First Name:</label>
  <input type="text" [(ngmodel)]="user.firstName">
  <br>
  <label>Enter Surname:</label>
  <input type="text" [(ngmodel)]="user.surname">
</div>

<h1>Hello,
  {{ user.firstName }}
  {{ user.surname }}</h1>

Notice the *ngIf has become *ngif and ngModel has become ngmodel.

Expected behavior
That this doesn't happen

Error/Stack Traces
N/A

System (please complete the following information):

  • OS: Windows 1903
  • Version: VSCode 1.35.1
  • Unibeautify Extension: 0.7.0

Additional context
I am using Angular. If the properties are renamed, it breaks things. I love this extension but I require it not to change the property names.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the bug label Jun 26, 2019
@stevenzeck
Copy link
Contributor

Waiting on Unibeautify/beautifier-prettydiff#119

@DanJBower
Copy link
Author

Hi @stevenzeck, now the PR has been merged, is there an ETA on when it will be included with the VS Code extension?

@stevenzeck
Copy link
Contributor

@Glavin001 any objection to 1. Releasing 0.9.0 of https://github.com/Unibeautify/beautifier-prettydiff and 2. Updating prettydiff in https://github.com/Unibeautify/vscode?

@DanJBower
Copy link
Author

@stevenzeck @Glavin001 Just to follow up, was this implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants