Kind of. Here's an example:

  @(define (test)
    (->html `(pre " 1\n 2\n 3\n 4")))
  @(define (iden . s) s)
  @iden{@(test)}

which results in

1
  2
  3
  4

while 

  @(define (test)
    (->html `(pre " 1\n 2\n 3\n 4")))
  @(define (iden . s) s)
@iden{@(test)}

results in:

1
2
3
4


On Thursday, December 29, 2016 at 1:21:35 PM UTC-5, [email protected] wrote:
>
> Here's the documentation of that behavior (this page is linked from within 
> the Pollen docs too):
>
>
> http://docs.racket-lang.org/scribble/reader.html#%28part._.Spaces__.Newlines__and_.Indentation%29
>
> I agree that it's confusing if you don't know to expect. But does it 
> surface in any situation other than the slightly oddball case of putting 
> spaces in front of a `when/splice`?
>
>
>
> On Sunday, December 25, 2016 at 12:40:46 AM UTC-8, 
> [email protected] wrote:
>>
>>   ◊(define test `(pre " 1\n 2\n 3\n 4"))
>>   ◊(->html test)
>>   ◊when/splice[#t]{◊(->html test)}
>>
>> in the template file results in:
>>
>> 1
>> 2
>> 3
>> 4
>>
>> 1
>>   2
>>   3
>>   4
>>
>> while:
>>
>> ◊(define test `(pre " 1\n 2\n 3\n 4"))
>> ◊(->html test)
>> ◊when/splice[#t]{◊(->html test)}
>>
>> results in:
>>
>> 1
>> 2
>> 3
>> 4
>>
>> 1
>> 2
>> 3
>> 4
>>
>> This causes wrong code display in some sites. For example, see 
>> http://mstill.io/blog/pollen-count.html
>>
>> I think I know why this happens: @-reader is trying to be smart, but it 
>> causes this unexpected behavior. Is this a known issue? I think it would be 
>> really great to have this documented somewhere so that people won't have to 
>> scratch their head.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to