◊(Local Yarn Code "Check-in [e54b3c52]")

Overview
Comment:Simplify a couple of HTML conversions
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e54b3c52b10a16a98c779867d1c8d3dc4ace1d407e8e2890f4aac54d365f59f2
User & Date: joel on 2019-04-07 21:11:05
Other Links: manifest | tags
Context
2019-04-07
21:32
Rename constants. Closes [fc2fc68] check-in: 74055398 user: joel tags: trunk
21:11
Simplify a couple of HTML conversions check-in: e54b3c52 user: joel tags: trunk
20:58
Support article listings from cached HTML. Resolves [f580d194] check-in: e493f1c6 user: joel tags: trunk
Changes

Modified crystalize.rkt from [5177f4d3] to [f6a60f0d].

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
    (doc2 maybe-title) (splitf-txexpr doc (make-tag-predicate 'title)))
  (define-values 
    (body-txpr note-txprs) (splitf-txexpr doc2 (make-tag-predicate 'note)))
  (define-values (disposition disp-note-id)
    (notes->last-disposition-values note-txprs))
  
  (let* ([pubdate (select-from-metas 'published (current-metas))]
         [doc-html    (->html (cdr body-txpr))]
         [title-specified? (not (equal? '() maybe-title))]
         [title-val   (if (not (null? maybe-title)) (car maybe-title) maybe-title)]
         [title-tx    (make-article-title title-val body-txpr disposition disp-note-id)]
         [title-html  (apply string-append (map ->html (get-elements title-tx)))]
         [title-plain (tx-strs title-tx)]
         [series-node (series-pagenode)]
         [header      (html$-article-open title-specified? title-tx pubdate)]
         [footertext (make-article-footertext pagenode series-node disposition disp-note-id (length note-txprs))]
         [footer (html$-article-close footertext)]
         [notes-section-html (crystalize-notes! pagenode title-plain note-txprs)])








|



|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
    (doc2 maybe-title) (splitf-txexpr doc (make-tag-predicate 'title)))
  (define-values 
    (body-txpr note-txprs) (splitf-txexpr doc2 (make-tag-predicate 'note)))
  (define-values (disposition disp-note-id)
    (notes->last-disposition-values note-txprs))
  
  (let* ([pubdate (select-from-metas 'published (current-metas))]
         [doc-html    (->html body-txpr #:splice? #t)]
         [title-specified? (not (equal? '() maybe-title))]
         [title-val   (if (not (null? maybe-title)) (car maybe-title) maybe-title)]
         [title-tx    (make-article-title title-val body-txpr disposition disp-note-id)]
         [title-html  (->html title-tx #:splice? #t)]
         [title-plain (tx-strs title-tx)]
         [series-node (series-pagenode)]
         [header      (html$-article-open title-specified? title-tx pubdate)]
         [footertext (make-article-footertext pagenode series-node disposition disp-note-id (length note-txprs))]
         [footer (html$-article-close footertext)]
         [notes-section-html (crystalize-notes! pagenode title-plain note-txprs)])