summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hypnotisml.lisp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/hypnotisml.lisp b/src/hypnotisml.lisp
index 846e30f..b681f30 100644
--- a/src/hypnotisml.lisp
+++ b/src/hypnotisml.lisp
@@ -365,13 +365,14 @@ ENSURE-NODE."
STYLES is either null or a STYLES instance.
ATTRIBS is either null or an ATTRIBS instance.
CONTENTS is a list of NODE instances."
- (when (<= 2 (count-if #'styles-p contents))
- (warn "There should be at most 1 STYLES instance in your elem contents."))
- (when (<= 2 (count-if #'attribs-p contents))
- (warn "There should be at most 1 ATTRIBS instance in your elem contents."))
- (values (find-if #'styles-p contents)
- (find-if #'attribs-p contents)
- (filter-nodes contents)))
+ (let ((contents (a:flatten contents)))
+ (when (<= 2 (count-if #'styles-p contents))
+ (warn "There should be at most 1 STYLES instance in your elem contents."))
+ (when (<= 2 (count-if #'attribs-p contents))
+ (warn "There should be at most 1 ATTRIBS instance in your elem contents."))
+ (values (find-if #'styles-p contents)
+ (find-if #'attribs-p contents)
+ (filter-nodes contents))))
(macrolet ((defelems (&body tags)
(let ((children (gensym "children"))