From ff5c3e879abba9fa3a95eab60f8dfdc12f22f642 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 10 Aug 2013 23:59:36 -0700 Subject: [PATCH] conflicting commit --- decode.rkt | 6 +++++- tests/pollen-lang-test.p | 2 +- tests/requires/include-me.rkt | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/decode.rkt b/decode.rkt index 8186e73..c242b4c 100644 --- a/decode.rkt +++ b/decode.rkt @@ -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"))) diff --git a/tests/pollen-lang-test.p b/tests/pollen-lang-test.p index c1fbdec..23c514b 100644 --- a/tests/pollen-lang-test.p +++ b/tests/pollen-lang-test.p @@ -2,7 +2,7 @@ ◊meta["metakey" "metavalue"] -Hello world +◊boqi{Hello world} ◊em{Love} diff --git a/tests/requires/include-me.rkt b/tests/requires/include-me.rkt index ff36178..5678b75 100644 --- a/tests/requires/include-me.rkt +++ b/tests/requires/include-me.rkt @@ -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?)