|
|
@ -28,7 +28,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
(define (strip-leading-newlines doc)
|
|
|
|
(define (strip-leading-newlines doc)
|
|
|
|
;; drop leading newlines, as they're often the result of `defines` and `requires`
|
|
|
|
;; drop leading newlines, as they're often the result of `defines` and `requires`
|
|
|
|
(dropf doc (λ (ln) (member ln (list (setup:newline) "")))))
|
|
|
|
(if (setup:trim-whitespace?)
|
|
|
|
|
|
|
|
(dropf doc (λ (ln) (member ln (list (setup:newline) ""))))
|
|
|
|
|
|
|
|
doc))
|
|
|
|
|
|
|
|
|
|
|
|
(define-syntax (pollen-module-begin stx)
|
|
|
|
(define-syntax (pollen-module-begin stx)
|
|
|
|
(syntax-case stx ()
|
|
|
|
(syntax-case stx ()
|
|
|
@ -43,14 +45,14 @@
|
|
|
|
DOC-ID ; positional arg for doclang-raw: name of export
|
|
|
|
DOC-ID ; positional arg for doclang-raw: name of export
|
|
|
|
(λ (xs)
|
|
|
|
(λ (xs)
|
|
|
|
(define proc (make-parse-proc PARSER-MODE ROOT-ID))
|
|
|
|
(define proc (make-parse-proc PARSER-MODE ROOT-ID))
|
|
|
|
(define trimmed-xs ((if (setup:trim-whitespace?) strip-leading-newlines values) xs))
|
|
|
|
(define trimmed-xs (strip-leading-newlines xs))
|
|
|
|
(define doc-elements (splice trimmed-xs (setup:splicing-tag)))
|
|
|
|
(define doc-elements (splice trimmed-xs (setup:splicing-tag)))
|
|
|
|
(proc doc-elements)) ; positional arg for doclang-raw: post-processor
|
|
|
|
(proc doc-elements)) ; positional arg for doclang-raw: post-processor
|
|
|
|
(module META-MOD-ID racket/base
|
|
|
|
(module META-MOD-ID racket/base
|
|
|
|
(provide METAS-ID)
|
|
|
|
(provide METAS-ID)
|
|
|
|
(define METAS-ID META-HASH))
|
|
|
|
(define METAS-ID META-HASH))
|
|
|
|
(require pollen/top pollen/core pollen/setup (submod "." META-MOD-ID))
|
|
|
|
(require pollen/top pollen/core pollen/setup (submod "." META-MOD-ID))
|
|
|
|
(provide (all-defined-out) METAS-ID DOC-ID)
|
|
|
|
(provide (all-defined-out) METAS-ID DOC-ID doc+metas)
|
|
|
|
(define prev-metas (current-metas))
|
|
|
|
(define prev-metas (current-metas))
|
|
|
|
(and (current-metas METAS-ID) "") ; because empty strings get stripped, voids don't
|
|
|
|
(and (current-metas METAS-ID) "") ; because empty strings get stripped, voids don't
|
|
|
|
(begin . EXPRS)
|
|
|
|
(begin . EXPRS)
|
|
|
|