Commit ffd3337f authored by Marco Antoniotti's avatar Marco Antoniotti 💬
Browse files

Added macro HTMLISE.

British spelling for slightly different macro.
parent 37d9e76b
......@@ -479,6 +479,10 @@ Serves as a 'factory' for ELEMENT objects and as a hook for peri-call methods.")
(declare (type html-sexp-syntax syntax))
(rewrite-form xhtml-form syntax))
(defmacro htmlise ((&key (syntax *default-html-sexp-syntax*)) xhtml-form)
(declare (type html-sexp-syntax syntax))
(rewrite-form xhtml-form syntax))
(defun htmlize* (xhtml-form &key (syntax *default-html-sexp-syntax*))
(declare (type html-sexp-syntax syntax))
(rewrite-form xhtml-form syntax))
......@@ -792,7 +796,20 @@ Serves as a 'factory' for ELEMENT objects and as a hook for peri-call methods.")
`(write ,html
:stream ,stream
:pprint-dispatch *xhtml-pd*
:pretty ',print-pretty
:pretty ,print-pretty
))
(defmacro with-html-syntax-output ((stream
&key
(print-pretty *print-pretty*)
(syntax *default-html-sexp-syntax*)
)
html)
`(write (htmlize ,html :syntax ,syntax)
:stream ,stream
:pprint-dispatch *xhtml-pd*
:pretty ,print-pretty
))
......@@ -842,10 +859,11 @@ Serves as a 'factory' for ELEMENT objects and as a hook for peri-call methods.")
(when content
(write-char #\> s)
;;(pprint-indent :block 4 s)
;; (pprint-indent :block 4 s)
(pprint-newline :mandatory s)
(format s "~{~4,0:T~:W~_~}" content)
;;(pprint-indent :block -4 s)
;; (format s "~{~:W~_~}" content)
;; (pprint-indent :block -4 s)
))
(if content
(format s "~0I</~A>" tag)
......@@ -855,7 +873,7 @@ Serves as a 'factory' for ELEMENT objects and as a hook for peri-call methods.")
(defun pprint-xhtml-string (s xhtml-string)
(declare (type string xhtml-symbol))
(declare (type string xhtml-string))
(write-string xhtml-string s))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment