((atom form) (push form r))
((and (consp form) (keywordp (car form)))
(push (format nil "<~A" (car form)) r)
- (let (content)
- (labels ((process-attributes (attrs)
- (cond ((null attrs) )
- ((= 1 (length attrs)) (setf content attrs))
- ((consp (car attrs))
- (push `(if ,(first attrs)
- (concat-string ,(format nil " ~A=\"" (second attrs)) ,(third attrs) "\"")
- "")
- r)
- (process-attributes (cdddr attrs)))
- (t (push (format nil " ~A=\"" (first attrs)) r)
- (push (second attrs) r)
- (push "\"" r)
- (process-attributes (cddr attrs))))))
- (process-attributes (cdr form))
+ (labels ((process-attributes (el-body)
+ (when el-body
+ (if (or (consp (car el-body)) (= 1 (length el-body)))
+ el-body
+ (progn (push (format nil " ~A=\"" (car el-body)) r)
+ (push (cadr el-body) r)
+ (push "\"" r)
+ (process-attributes (cddr el-body)))))))
+ (let ((content (process-attributes (cdr form))))
(if (or content (not *self-closing-tags-p*))
(progn (push ">" r)
(when content (map nil #'process-form content))
(test-ps-js slot-value-lambda
(slot-value (lambda ()) 'prototype)
"(function () { }).prototype")
+
+(test-ps-js who-html1
+ (who-ps-html (:span :class "ticker-symbol"
+ :ticker-symbol symbol
+ (:a :href "http://foo.com"
+ symbol)
+ (:span :class "ticker-symbol-popup")))
+ "'<SPAN CLASS=\"ticker-symbol\" TICKER-SYMBOL=\"' + symbol + '\"><A HREF=\"http://foo.com\">' + symbol + '</A><SPAN CLASS=\"ticker-symbol-popup\"/></SPAN>'")