Skip to content

PostHTML limitations for HTML minifying #99

@maltsev

Description

@maltsev

In #29 @SukkaW asked whether it's possible to remove closing tags in PostHTML since it'd produce an invalid HTML. Although I don't know the answer to that particular question, it raises a more important question.

PostHTML provides a very useful API and helps a lot in HTML processing, but we'll get to the point when not all minifications could be implemented due to its limitations (e.g., how it processed HTML and which transformations it supports). I see two possible solutions:

  • don't implement these minifications — optimal from the dev perspective (i.e., more clean and straightforward code), but not from the end-user perspective

  • implement them on top of PostHTML — the code would become messier and more complex, but HTML would get minified better.

Neither of them is good. So, what do you guys think?

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