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

removeTags removes line breaks #177

Closed
anvish opened this issue Apr 16, 2016 · 1 comment
Closed

removeTags removes line breaks #177

anvish opened this issue Apr 16, 2016 · 1 comment

Comments

@anvish
Copy link

anvish commented Apr 16, 2016

Setting removeTags: true causes removal of line breaks between imported <script> tags

    <!-- inject:js -->
    <!-- endinject -->

leads to
<script src="js/main.min.js"></script><script src="js/_ts.min.js"></script>

@jmight
Copy link

jmight commented Apr 26, 2016

I just noticed this after doing a fresh upgrade to Gulp 4.

Commenting out the following line in node_modules/gulp-inject/src/inject/index.js makes it work again:

// startTag.lastIndex -= startMatch[0].length;

I ran a test with and without that line commented and then diff'd the output of the two files. The only difference was the line breaks between <script> and <link rel="stylesheet"> tags.

Don't have the time to comb through the entire gulp-inject source to see if there will be any negative side affects of commenting out the line, but there don't appear to be any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants