ruricolist / spinneret

Common Lisp HTML5 generator
MIT License
369 stars 26 forks source link

Reequest: Add Example with parenscript #73

Closed omarbassam88 closed 1 year ago

omarbassam88 commented 1 year ago

I was not able to use spinneret with parenscript unfortunately. Can you pleease add more Documentaion or examples about it. loading the spinneret/ps didn't help.

for example:

(with-html-string
  (:script (ps
                  (defun greeting ()
                     (alert "Helo"))))

it escapes the " in "Helo" and doesn't interpret it as javascript string. The result of the ps macro is correct but the with-html or with-html-string mess it up for some reason.

mooseyboots commented 1 year ago

i have been trying to do much the same thing.

(with-html-string
  (:script (:raw (ps
                  (defun greeting ()
                     (alert "Hello")))))

will unfuck your ", which is a start.

ruricolist commented 1 year ago

Sorry, I missed this issue when it was opened. I've added a section on using ParenScript in Spinneret.