We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug controller.enque will remove empty chunks from stream When using e.g. LineStream, all empty lines are removed from the stream.
Steps to Reproduce
import { LineStream, DelimiterStream } from "https://deno.land/std@0.127.0/streams/mod.ts" const encoder = new TextEncoder(); const textStream = new ReadableStream({ start(controller) { controller.enqueue(encoder.encode("Linie 1\n\nLine 3\n")); controller.close(); }, }); let countLines = 0; const lines = textStream .pipeThrough(new LineStream()) .pipeThrough(new TextDecoderStream()) .pipeThrough(new TransformStream({ transform(chunk, controller) { countLines++ console.log(`${countLines} LINE: "${chunk}" - ${chunk.length}`) controller.enqueue(chunk) } })) .pipeThrough(new TextEncoderStream()) const buf = []; for await (const s of lines) { buf.push(s); }
wrong result
1 LINE: "Linie 1" - 7 2 LINE: "Line 3" - 6
Expected behavior
empty Lines should not be suppressed
correct result
1 LINE: "Linie 1" - 7 2 LINE: ""- 0 3 LINE: "Line 3" - 6
Environment
The text was updated successfully, but these errors were encountered:
upstream whatwg/encoding#283
Sorry, something went wrong.
This has been addressed in denoland/deno_std#1978. This problem will now not occur with TextLineStream.
TextLineStream
No branches or pull requests
Describe the bug
controller.enque will remove empty chunks from stream
When using e.g. LineStream, all empty lines are removed from the stream.
Steps to Reproduce
wrong result
Expected behavior
empty Lines should not be suppressed
correct result
Environment
The text was updated successfully, but these errors were encountered: