Skip to content

Commit

Permalink
Forgot to push changes to dom.rkt
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyler Griffith committed Nov 10, 2020
1 parent 5611056 commit 14e7581
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dom.rkt
Expand Up @@ -3,9 +3,9 @@

(provide (struct-out dom) dom-context in-elements in-boxes parse-dom unparse-dom
dom-box->elt dom-elt->box dom-first-box? dom-last-box?
dom-strip-positions dom-set-range)
dom-strip-positions dom-set-range dom-rematch!)

(struct dom (name properties elements boxes match) #:prefab)
(struct dom (name properties elements boxes match) #:prefab #:mutable)

(define (dom-context dom key #:default [default #f])
(dict-ref (dom-properties dom) key default))
Expand All @@ -26,6 +26,9 @@
[boxes (unparse-tree (dom-boxes doc))]
[match #f]))

(define (dom-rematch! dom)
(set-dom-match! dom (build-match (dom-elements dom) (dom-boxes dom))))

(define (build-match elts boxes)
(define num->elt (make-hasheq))
(define box->elt (make-hasheq))
Expand Down

0 comments on commit 14e7581

Please sign in to comment.