diff options
author | Ludovic Courtès | 2009-05-26 19:02:01 +0200 |
---|---|---|
committer | Ludovic Courtès | 2009-05-26 19:02:01 +0200 |
commit | 7221ccf9edd1ebde56a7915a338dacf537e8f3fb (patch) | |
tree | 22192210be2af8e92de144f3a948319be9535cb5 /src/guile | |
parent | 46e04425fee7fc462e5c1a718688d2b508291366 (diff) | |
download | skribilo-7221ccf9edd1ebde56a7915a338dacf537e8f3fb.tar.gz skribilo-7221ccf9edd1ebde56a7915a338dacf537e8f3fb.tar.lz skribilo-7221ccf9edd1ebde56a7915a338dacf537e8f3fb.zip |
Make sure to bind nodes that are in the body of non-markup nodes.
* src/guile/skribilo/ast.scm (document-bind-nodes!): Traverse other
nodes as well, such as processors.
* src/guile/skribilo/resolve.scm (do-resolve!<unresolved>>): Likewise.
* tests/resolve.test ("resolved nested document bindings"): New test.
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/ast.scm | 3 | ||||
-rw-r--r-- | src/guile/skribilo/resolve.scm | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/guile/skribilo/ast.scm b/src/guile/skribilo/ast.scm index 86fa781..99ce3cf 100644 --- a/src/guile/skribilo/ast.scm +++ b/src/guile/skribilo/ast.scm @@ -510,6 +510,9 @@ (document-bind-node! doc node) (loop (markup-body node) doc)) + ((node? node) + (loop (node-body node) doc)) + ((pair? node) (for-each (lambda (n) (loop n doc)) node)) diff --git a/src/guile/skribilo/resolve.scm b/src/guile/skribilo/resolve.scm index 2073f25..d8efe08 100644 --- a/src/guile/skribilo/resolve.scm +++ b/src/guile/skribilo/resolve.scm @@ -206,7 +206,7 @@ ;; Bind non-unresolved children of RES now so that unresolved ;; children of RES (if any) can look them up in the next `resolve!' - ;; run. (XXX: This largely duplicated `document-bind-nodes!'.) + ;; run. (XXX: This largely duplicates `document-bind-nodes!'.) (let loop ((node res) (doc (ast-document node))) (if (ast? node) @@ -224,6 +224,9 @@ (document-bind-node! doc node) (loop (markup-body node) doc)) + ((node? node) + (loop (node-body node) doc)) + ((pair? node) (for-each (lambda (n) (loop n doc)) node)) |