Smart whitespace not respecting chr

Not sure if I should be doing a something different

I’m outputting content that is text/event-stream; charset=utf-8
one of the requirements from what I understand is that it has to end with two newlines, this works on ACF currently
Example

cat
#chr(10)#
#chr(10)#
dog
#chr(10)#
#chr(10)#
#chr(10)#
#chr(10)#
swan
#chr(10)#

When outputted I would expect this to be ten lines long, instead it ends up being 4 lines outputted.

Is there a different whitespace setting I should use

No Whitespace:outputs 49 lines, probably due to some other test code that I have been attempting
Simple:outputs 6 lines
Smart: outputs 4 lines

Hi @Josh_Knutson,

I don’t now what the exact issue was. I run the above code with

No white space: It takes space for every chr() for example it takes 4 line spaces b/w cat & dog.

Simple & Smart: Working same without any spaces b/w the content.

Can you explain a detail? What is working fine on ACF?

I’ll try to have a better test case, I guess I want to force the the chr 10 to stay in place when I have Simple and Smart turned on. Since I am explicitly trying to set those characters.

Using chr10 with Simple or Smart Whitespace turned on it trims the space. I think the lucee acts in correct way. @micstriit will confirm about this

does echo() bypass whitespace management?

Lucee doesn’t know what whitespace characters you output on purpose and on accident. All page output ends up in a giant buffer of characters and Lucee doesn’t try and keep track of how you output each one. So your chr() calls are no more “explicit” than hitting enter. I would say automatic whitespace might not be a good setting for you.

I would doubt it since it just dumps text into the output buffer. I’ve always been under the impression that the whitespace management is more of a post processor that acts on the output buffer at the end of the request.

so we just need the ability to control it per request…