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

File extension problem #25

Closed
viktorvi opened this issue Apr 14, 2016 · 3 comments
Closed

File extension problem #25

viktorvi opened this issue Apr 14, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@viktorvi
Copy link

I have some javascript files which name include "aspx" string.

For example: codes.aspx.js

html-minifier try to minify them becasure their name include "aspx". Minifier crash from these files.

@heldersepu
Copy link
Contributor

This bug is caused by line 32:
https://github.com/deanhume/html-minifier/blob/master/ViewMinifier/Program.cs#L32

if (filePath.ToLower().Contains(".cshtml") || filePath.ToLower().Contains(".vbhtml") || filePath.ToLower().Contains(".aspx") || filePath.ToLower().Contains(".html") || filePath.ToLower().Contains(".htm") || filePath.ToLower().Contains(".ascx") || filePath.ToLower().Contains(".master"))

Not sure that should be using Contains maybe EndsWith is a better option

@deanhume
Copy link
Owner

deanhume commented Apr 18, 2016

Good spot @heldersepu 👍

@deanhume deanhume self-assigned this Apr 18, 2016
@deanhume deanhume added this to the Release 1.8 milestone Apr 18, 2016
@deanhume deanhume added the bug label Apr 18, 2016
@deanhume
Copy link
Owner

This has been fixed and will be released with Release 1.8

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

3 participants