jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
388 stars 62 forks source link

rev-replace is removing self closing tags #37

Open wgorder opened 9 years ago

wgorder commented 9 years ago

I am having an issue where I need the HTML5 outputted to be valid XML so I wish to keep the self closing tag in my link.

I am using useref pretty much exactly as described in the README

I start with this:

        <!-- build:css styles/app.css -->
        <link rel="stylesheet" href="styles/index.css" />
        <!-- endbuild -->

I am ending up with this:

        <link rel="stylesheet" href="styles/app-9bd342b9b3.css">

Now this would be perfect if it did not strip the self closing tag. What I want is this:

 <link rel="stylesheet" href="styles/app-9bd342b9b3.css"/>

I confirmed its the revreplace and not useref that is doing this. As a matter of fact according to their examples useref will actually add in the self closing tag if its missing.

Can you tell me how I can fix this issue please?