better split-meta-elements error

pull/58/head
Matthew Butterick 10 years ago
parent 97b4dea0ca
commit 2dae1ca31f

@ -31,6 +31,8 @@
[else (reverse acc)]))) [else (reverse acc)])))
(define (split-meta-elements x) ; pull metas out of doc and put them into meta-elements accumulator (define (split-meta-elements x) ; pull metas out of doc and put them into meta-elements accumulator
(when (not (txexpr? x))
(error 'split-meta-elements "Not a txexpr: ~v" x))
(define-values (thing-without-meta-elements meta-elements) (splitf-txexpr x meta-element?)) (define-values (thing-without-meta-elements meta-elements) (splitf-txexpr x meta-element?))
;; trivial metas are discarded ;; trivial metas are discarded
(define exploded-meta-elements (append-map explode-meta-element (filter nontrivial-meta-element? meta-elements))) (define exploded-meta-elements (append-map explode-meta-element (filter nontrivial-meta-element? meta-elements)))

Loading…
Cancel
Save