conflicting commit

pull/9/head
Matthew Butterick 11 years ago
parent d58260dbc8
commit ff5c3e879a

@ -55,6 +55,10 @@
'(p "\n" "foo" "\n\n" "bar" (em "\n\n\n"))))
(define block-names block-tags)
(define (register-block-name tag)
(set! block-names (cons tag block-names)))
;; is the named-xexpr a block element (as opposed to inline)
(define/contract (block-xexpr? x)
(any/c . -> . boolean?)
@ -63,7 +67,7 @@
;; todo: make sure this is what I want.
;; this is, however, more consistent with browser behavior
;; (browsers assume that tags are inline by default)
((named-xexpr? x) . and . (->boolean ((named-xexpr-name x) . in . block-tags))))
((named-xexpr? x) . and . (->boolean ((named-xexpr-name x) . in . block-names))))
(module+ test
(check-true (block-xexpr? '(p "foo")))

@ -2,7 +2,7 @@
meta["metakey" "metavalue"]
Hello world
boqi{Hello world}
em{Love}

@ -6,6 +6,8 @@
(module+ test (require rackunit))
(register-block-name 'boqi)
;; todo: contracts & unit tests
(define/contract (meta-proc meta)
(meta-xexpr? . -> . named-xexpr?)

Loading…
Cancel
Save