scribble: preserve order of ".js", ".css", and ".tex" additions
original commit: 08604b027740e515d69b677d8542eb45fc8791b2
This commit is contained in:
parent
a9141a3c3d
commit
34f12bcd59
|
@ -118,9 +118,9 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(define/public (extract-part-style-files d ri tag stop-at-part? pred extract)
|
(define/public (extract-part-style-files d ri stop-at-part? pred extract)
|
||||||
(let ([ht (make-hash)])
|
(let ([ht (make-hash)])
|
||||||
(let loop ([p d][up? #t][only-up? #f])
|
(let loop ([p d] [up? #t] [only-up? #f])
|
||||||
(let ([s (part-style p)])
|
(let ([s (part-style p)])
|
||||||
(when up?
|
(when up?
|
||||||
(let ([p (collected-info-parent (part-collected-info p ri))])
|
(let ([p (collected-info-parent (part-collected-info p ri))])
|
||||||
|
@ -137,14 +137,19 @@
|
||||||
(unless (stop-at-part? p)
|
(unless (stop-at-part? p)
|
||||||
(loop p #f #f)))
|
(loop p #f #f)))
|
||||||
(part-parts p)))))
|
(part-parts p)))))
|
||||||
(for/list ([k (in-hash-keys ht)]) (if (or (bytes? k) (url? k))
|
(map cdr
|
||||||
k
|
(sort
|
||||||
(main-collects-relative->path k)))))
|
(for/list ([(k v) (in-hash ht)])
|
||||||
|
(cons v (if (or (bytes? k) (url? k))
|
||||||
|
k
|
||||||
|
(main-collects-relative->path k))))
|
||||||
|
<
|
||||||
|
#:key car))))
|
||||||
|
|
||||||
(define/private (extract-style-style-files s ht pred extract)
|
(define/private (extract-style-style-files s ht pred extract)
|
||||||
(for ([v (in-list (style-properties s))])
|
(for ([v (in-list (style-properties s))])
|
||||||
(when (pred v)
|
(when (pred v)
|
||||||
(hash-set! ht (extract v) #t))))
|
(hash-update! ht (extract v) values (hash-count ht)))))
|
||||||
|
|
||||||
(define/private (extract-flow-style-files blocks d ri ht pred extract)
|
(define/private (extract-flow-style-files blocks d ri ht pred extract)
|
||||||
(for ([b (in-list blocks)])
|
(for ([b (in-list blocks)])
|
||||||
|
|
|
@ -704,7 +704,6 @@
|
||||||
(append (extract-part-style-files
|
(append (extract-part-style-files
|
||||||
d
|
d
|
||||||
ri
|
ri
|
||||||
'css
|
|
||||||
(lambda (p) (part-whole-page? p ri))
|
(lambda (p) (part-whole-page? p ri))
|
||||||
css-addition?
|
css-addition?
|
||||||
css-addition-path)
|
css-addition-path)
|
||||||
|
@ -720,7 +719,6 @@
|
||||||
(extract-part-style-files
|
(extract-part-style-files
|
||||||
d
|
d
|
||||||
ri
|
ri
|
||||||
'css
|
|
||||||
(lambda (p) (part-whole-page? p ri))
|
(lambda (p) (part-whole-page? p ri))
|
||||||
js-addition?
|
js-addition?
|
||||||
js-addition-path))
|
js-addition-path))
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
(append (extract-part-style-files
|
(append (extract-part-style-files
|
||||||
d
|
d
|
||||||
ri
|
ri
|
||||||
'tex
|
|
||||||
(lambda (p) #f)
|
(lambda (p) #f)
|
||||||
tex-addition?
|
tex-addition?
|
||||||
tex-addition-path)
|
tex-addition-path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user