Paste number 146518: Using CL-INTERPOL for HTML templating (example also uses NAMED-READTABLES)

Paste number 146518: Using CL-INTERPOL for HTML templating (example also uses NAMED-READTABLES)
Pasted by: vsedach
When:2 years, 6 months ago
Share:Tweet this! | http://paste.lisp.org/+351Y
Channel:None
Paste contents:
Raw Source | XML | Display As
(defvar *html-stream* *standard-output*)

(defreadtable quicklisp-dir
  (:merge :standard)
  (:case :invert)
  (:dispatch-macro-char #\# #\H
    (lambda (&rest args)
      `(princ ,(apply #'cl-interpol::interpol-reader args) *html-stream*))))

(with-output-to-string (*html-stream*)
  #H[<a href='${foo}'>${bar}</a>])

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.