New release 0.0.3
You can download it from
http://www.common-lisp.net/project/cl-emb/
or install with ASDF-Install.
> (require :asdf-install)
> (asdf-install:install :cl-emb)
Changes:
- Comments. Everything within <%# ... #%> will be removed/ignored.
(With "<%" and "%>" representing the current start and end
marker.)
- Escaping. New special variable *ESCAPE-TYPE* and a modifier for
@var. Supported escaping: raw, xml (aka html), uri (aka url or
url-encode)
Example:
CL-USER> (emb:register-emb "test5"
"<a href=\"http://somewhere.test/test.cgi?<% @var foo -escape uri %>\"><% @var foo %></a>")
#<CL-EMB::EMB-FUNCTION {9FBF5F1}>
CL-USER> (let ((emb:*escape-type* :html))
(emb:execute-emb "test5" '(:foo "10 > 7")))
"<a href=\"http://somewhere.test/test.cgi?10+%3E+7\">10 > 7</a>"
New release 0.0.2
You can download it direct from
http://www.common-lisp.net/project/cl-emb/
or install it with ASDF-Install.
Changes:
Added special variables *emb-start-marker* and *emb-end-marker*
This change was inspired by the patches Peter Minten sent me.
Thanks!
You can now use other start and end markers instead of "<%" and
"%>", which are the default.
Examble:
CL-USER> (let ((emb:*emb-start-marker* "<?emb")
(emb:*emb-end-marker* "?>"))
(emb:register-emb "marker-test"
"42 + 42 = <?emb= (+ 42 42) ?>"))
#<CL-EMB::EMB-FUNCTION {97BEFD9}>
CL-USER> (emb:execute-emb "marker-test")
"42 + 42 = 84"