Skip to content

Case of dom element attributes is dropped, unnecessary end of line period #46

Description

@rmckeel

In the following example, *ngFor attribute is converted into *ngfor attribute in pug. I believe this is a mistake to force lowercase on conversion, and results in non-functional Angular code in this case.

INPUT:
echo "<div class="products" *ngFor="let product of products"/>" | html2pug -d -f

OUTPUT:
.products(*ngfor="let" product of products).

Additionally, the end dot is unnecessary as there is no further text.

Side note: I'd love to see "smarter" processing of when to use a dot at the end of the line. In practice, I use a dot at the end of the line seldomly, preferring the next line starting with pipe as it is typically only one line. Perhaps a pipe could be used when it is only one line, and a dot when it is multiple lines?

Thanks for your work on this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions