add `current-metas` parameter (addresses #166)

pull/169/head
Matthew Butterick 7 years ago
parent 485dc2c062
commit 656d53c73f

@ -15,6 +15,7 @@
(define+provide define-meta identity) ;; stub so it will be picked up for docs
(define+provide current-metas (make-parameter #f))
(define+provide/contract (select* key value-source [caller 'select*])
((coerce/symbol? (or/c is-meta-value? is-doc-value? pagenode? pathish?)) (symbol?) . ->* . (or/c #f txexpr-elements?))

@ -1,6 +1,6 @@
#lang racket/base
(require (for-syntax racket/base racket/syntax "../setup.rkt" "split-metas.rkt")
"to-string.rkt" "../pagetree.rkt" "splice.rkt" "../setup.rkt")
"to-string.rkt" "../pagetree.rkt" "splice.rkt" "../setup.rkt" "../core.rkt")
(provide (except-out (all-from-out racket/base) #%module-begin)
(rename-out [dialect-module-begin #%module-begin]))
@ -17,7 +17,7 @@
(define-syntax (pmb stx)
(syntax-case stx ()
[(_ . EXPRS) (with-syntax ([EXPRS (syntax-property #'EXPRS 'parser-mode-from-expander 'PARSER-MODE-FROM-EXPANDER)])
#'(pollen-module-begin . EXPRS))]))
#'(pollen-module-begin . EXPRS))]))
READER-SUBMOD))
@ -64,8 +64,11 @@
(module inner pollen/private/doclang-raw
DOC-RAW ; positional arg for doclang-raw that sets name of export
(require pollen/top pollen/core pollen/setup (submod ".." META-MOD-ID))
(and (current-metas METAS-ID) "\n") ; because newlines get stripped, voids don't
(provide (all-defined-out) METAS-ID)
. EXPRS-WITHOUT-METAS)
(define prev-metas (current-metas))
(require 'inner)
(define DOC-ID
@ -76,4 +79,5 @@
[doc-elements-spliced (splice doc-elements (setup:splicing-tag))])
(proc doc-elements-spliced)))
(current-metas prev-metas)
(provide DOC-ID (except-out (all-from-out 'inner) DOC-RAW)))))]))

@ -1 +1 @@
1516502120
1516572991

Loading…
Cancel
Save