> On Oct 29, 2020, at 9:21 PM, Sorawee Porncharoenwase 
> <[email protected]> wrote:
> 
> Whoops. I meant:
> 
> #lang pollen 
> 
> ◊(define (vb . s) s)
> 
> ◊vb{     A     B
>                C     D}
> and the output is:
> 
> '("     A     B" "\n" "           " "C     D")
> 
> On Thu, Oct 29, 2020 at 9:19 PM Sorawee Porncharoenwase 
> <[email protected] <mailto:[email protected]>> wrote:
> I think the issue is with vb. How does it work?
> 
> If you try
> 
> #lang pollen
> 
> @(define (vb . s) s)
> 
> ◊vb{     A     B
>                C     D}
> you will find that it outputs:
> 
> '(vb "     A     B"
>      "\n" 
>      "           " 
>      "C     D")
> The third element is the space before “C”. It's not discarded.
> 
> Also notice that the "start" of the line is at the marker shown below
> 
> 
> 
> 
> #lang pollen
> 
> @(define (vb . s) s)
> 
> ◊vb{     A     B
>  >>>           C     D}
> This is due to how @ syntax 
> <https://docs.racket-lang.org/scribble/reader.html#%28part._.Spaces__.Newlines__and_.Indentation%29>
>  works.


Here’s my pollen.rkt:

#lang racket/base
(require pollen/decode pollen/misc/tutorial txexpr
         #;(only-in racket make-list string->number))
(provide (all-defined-out))
(define (root . elements)
   (txexpr 'root empty (decode-elements elements
     #:txexpr-elements-proc decode-paragraphs
     #:string-proc (compose1 smart-quotes smart-dashes))))

And  here’s an initial test.html.pm:


#lang pollen

       A       B
       C       D

Which produces
'(root "A       B" (br) "C       D")

Now if I add the vb as you’ve done, but don’t use the tag:

#lang pollen
◊(define (vb . s) s)

       A       B
       C       D

I get this:
'(root "A       B" (br) "       " "C       D")


Kevin


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2202E524-AAC0-44D3-9B4B-C49216733900%40gmail.com.

Reply via email to