Inserting html comment with pollen command #126
Comments
The documentation of
Unfortunately, it's not, and I personally consider this a Pollen bug. That being said, I'm curious why do you want to generate HTML comments? They won't be displayed to users anyway. And if you want to write a comment in the source, wouldn't it be better to do so in the Pollen source rather than HTML source? Pollen does support a comment syntax already:
|
I just pushed an update to the underlying #lang pollen/mode racket
(require pollen/tag pollen/template/html rackunit)
(define html-comment '(@ "<!-- this is a comment -->"))
(define root (default-tag-function 'root))
(define doc ◊root{this is a paragraph ◊html-comment})
(check-equal? (->html doc) "<root>this is a paragraph <!-- this is a comment --></root>") Keep in mind that the comment string, like a |
Whoops, didn't mean to close the issue. @sorawee I am using an HTML presentation framework ( @mbutterick Amazing! Thank you! |
See also https://github.com/applied-science/talks/tree/master/mxnet (example of using Pollen to orchestrate reveal.js) |
I want to insert an html comment
<!-- like this -->
with a pollen command, but I'm not sure how I would define a tag function, since a comment doesn't take the same form as other tags.EDIT: I'm realizing that a tag is probably not the way to accomplish this. But how would I insert a
<
or>
without getting turned into<
or>
?From this pollen markup:
I want to get this:
but I'm getting this:
which the browser isn't sure how to interpret, and turns into this:
The text was updated successfully, but these errors were encountered: