diff --git a/hyphenate/xexpr.rkt b/hyphenate/hx.rkt similarity index 82% rename from hyphenate/xexpr.rkt rename to hyphenate/hx.rkt index a90e5efc..e0fc36fa 100644 --- a/hyphenate/xexpr.rkt +++ b/hyphenate/hx.rkt @@ -1,7 +1,7 @@ #lang racket/base (require "main.rkt") (require xml) - +(require tagged-xexpr) #| @@ -20,10 +20,23 @@ The following grammar describes expressions that create X-expressions: ;; recursively hyphenate strings within xexpr ;; todo: add exclusion #:only [only-proc (λ(x) x)] -(define (hyphenate-xexpr x ) - (define exclusions '(style script)) ; omit these from ever being hyphenated +(define (hx x) + (cond + [(string? x) (hyphenate x)] + [(tagged-xexpr? x) x] + ;; + ;; + [else x] ;; catches symbols, valid-chars, and cdata + ) - (cond + ) + + +#| + (define exclusions '(style script)) ; omit these from ever being hyphenated + + +(cond ; todo: the only-proc semantics are illogical. ; main issue: keep it out of tags like