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

newline under comment block inserted with keepBlockTags: true #42

Open
sonicblis opened this issue Dec 15, 2015 · 0 comments
Open

newline under comment block inserted with keepBlockTags: true #42

sonicblis opened this issue Dec 15, 2015 · 0 comments

Comments

@sonicblis
Copy link

In Jetbrains IDE WebStorm, replacing content and keeping the blocks seems to add a newline under the blocks when the content is changed.

gulp.task('prodBaseUrl', function(){
    gulp.src('index.html')
        .pipe(htmlReplace(
            {
                base:{
                    src: 'https://myprodurl.com/index.html',
                    tpl: '<base href="%s" />'
                }
            },
            {
                keepBlockTags: true
            })
        )
        .pipe(gulp.dest('./'));
});

after a couple of transformations, my index.html goes from this

<!-- build:base -->
<base href="https://myprodurl.com/index.html" />
<!-- endbuild -->

<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans' type='text/css'>

to this

<!-- build:base -->
<base href="https://myprodurl.com/index.html" />
<!-- endbuild -->



<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans' type='text/css'>
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

1 participant