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

Keep uppercase option #8

Closed
ramon-nogueira opened this issue Jan 28, 2021 · 10 comments
Closed

Keep uppercase option #8

ramon-nogueira opened this issue Jan 28, 2021 · 10 comments

Comments

@ramon-nogueira
Copy link

Hello.. I love https://html2pug.now.sh/

I used to develop Angular Apps and it's case sensitive.
Can we have an option to keep uppercase letters in code? The PUG is always being in lowercase mode.
Thanks!

@dimensi
Copy link
Owner

dimensi commented Jan 28, 2021

Plz give a example. What do you expect?

@ramon-nogueira
Copy link
Author

ramon-nogueira commented Jan 28, 2021

For example:

<nz-page-header class="site-page-header" (nzBack)="onBack()" nzBackIcon nzTitle="Title" nzSubtitle="This is a subtitle">
</nz-page-header>

is transformed to:

nz-page-header.site-page-header((nzback)="onBack()", nzbackicon="", nztitle="Title", nzsubtitle="This is a subtitle")

I expect

nz-page-header.site-page-header((nzback)="onBack()", nzBackIcon="", nzTitle="Title", nzSubtitle="This is a subtitle")

@dimensi
Copy link
Owner

dimensi commented Jan 28, 2021

Well I think I could resolve this issue. I'll rewrite compiler from ground.

image

I've already get some results.

@dimensi
Copy link
Owner

dimensi commented Jan 30, 2021

You can check results here #9

@dimensi
Copy link
Owner

dimensi commented Jan 31, 2021

I've merged branch, now you @ramon-nogueira can look here https://html2pug.now.sh/

@altShiftDev
Copy link

I just tested this and the bug is still present, here's a test case:

<MyCustomComponent/> becomes => mycustomcomponent

Because components are case sensitive in angular/vue/react mycustomcomponent throws errors as undefined.

@dimensi
Copy link
Owner

dimensi commented Jan 1, 2022

Added support for these kinds of templates with @vue/compiler-dom. Give it a try.

image

@altShiftDev
Copy link

The new layout looks nice but the bug is still present:

<MyCustomComponent/> becomes mycustomcomponent all lowercase.

@dimensi
Copy link
Owner

dimensi commented Jan 2, 2022

image

result:

QBtn(icon="event" round color="primary")
  QPopupProxy(@before-show="updateProxy" cover transition-show="scale" transition-hide="scale")
    QDate(v-model="proxyDate")
      .row.items-center.justify-end.q-gutter-sm
        QBtn(label="Cancel" color="primary" flat v-close-popup)
        QBtn(label="OK" color="primary" flat @click="save" v-close-popup)

@dimensi
Copy link
Owner

dimensi commented Jan 9, 2022

No response from the author. I added the function and checked it myself. I am closing this issue. If there are any comments, you can reopen it.

@dimensi dimensi closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants