question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use the same replace in multiple pipes

See original GitHub issue

When I use the same replace in two pipes, one of the two pipes seemst to fail.

I try something like this:

var replace = require('gulp-replace');

var replaceStuff = replace(/foo/, function (match) {
  // ... do stuff...
  return 'bar';
});

return gulp.src('path')
      .pipe(replaceStuff)
      .pipe(gulp.dest('dest'));

return gulp.src('other/path')
      .pipe(replaceStuff)
      .pipe(gulp.dest('other/dest'));

Is this a bug or am I overlooking something?

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lazdcommented, Apr 26, 2021

Ah! Well that gives us something to look into. Thank you for following up!

0reactions
josdejongcommented, Apr 24, 2021

It has been some time 😅 . Yes same issue. When I follow the steps I wrote here https://github.com/lazd/gulp-replace/issues/21#issuecomment-71000659, I get the same end result (no docs being generated), but an error is thrown now instead of silence:

Error: write after end
    at writeAfterEnd (...\mathjs-pages\node_modules\readable-stream\lib\_stream_writable.js:288:12)
Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How to replace || (two pipes) from a string with | (one) pipe
Use .replace("||", "|");. | is no special char. However, if you are using split() or replaceAll instead of replace() , beware that you...
Read more >
Replacing multiple consecutive spaces with Pipe character
Try this: String s = ' this is a multiple spaces sample '; System.debug(s.replaceAll('\\s+','|'));.
Read more >
Civil 3D - Swapping Multiple Pipes in a Pipe Network - YouTube
Have you ever wanted to swap multiple pipes in a pipe network only to be frustrated that you have to do them one...
Read more >
Using -replace on pipes in powershell - Super User
This should do the trick, it'll go through all the lines in the file, and replace any "a" with "b", but you'll need...
Read more >
If a database has 2 or more pipes , will all of them have the ...
I created two event notifications on s3 bucket to watch two different prefixes, but since notification_channel generated by snoflake is the same ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found