Oops, the pipeline in Pollen became fuzzy in my memory when I read your question. You're right. That doesn't work, because we can only do queries on post-processed document[1].
(However, this idea can be applied to warn an undefined tag in editor!) [1] I've actually asked a similar question: https://groups.google.com/d/topic/pollenpub/tcJALa33pKU/discussion On Friday, December 23, 2016 at 10:26:13 AM UTC-8, [email protected] wrote: > > Thank you everyone! > > @Matthew > > >> But having to define every tag in advance would be a massive, >> soul-killing project. >> > > Right. That's why I have the exception to allow unbound id that starts > with "/" to become a tag (after stripping "/" out, of course) like what > Pollen would normally do. > > >> You can wrap any function name in `def/c` to get the original behavior of >> `#%top`. >> > > Yeah, I saw that. However, it is not really an option. > > 1. I might forget to do this, and there would be nothing (say, error) > to remind me of it. > 2. Wrapping def/c would now be the soul-killing part! > > With what I did, if I forgot to put "/" in front of it, I would get an > error right away. > > But again, I'm not arguing that what I did is better. I just want to know > if there is any way to accomplish this without touching top.rkt > > @Li > > That's a great idea. But then how can I distinguish > > @div{ > ... > } > > with > > ; use like this: @my-pre{abcdef} > > (define (my-pre . xs) > `(div ,@xs)) > > Both of them will result in the same "div" in the document tree. I want to > first one to be an error, while the second shouldn't. > > -- 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.
