| 
167 | 167 |                   (cdr l))]  | 
168 | 168 |    [else (cons (car l) (merge-styles s cls (cdr l)))]))  | 
169 | 169 | 
 
  | 
170 |  | -(define (style->attribs style [extras null])  | 
 | 170 | +(define (style->attribs style [extras null]  | 
 | 171 | +                        #:transform-property [transform-property (λ (v proc) (proc v))])  | 
 | 172 | +  (define (default-transform-property v)  | 
 | 173 | +    (cond  | 
 | 174 | +      [(attributes? v)  | 
 | 175 | +       (map (lambda (v) (list (car v) (cdr v))) (attributes-assoc v))]  | 
 | 176 | +      [(color-property? v)  | 
 | 177 | +       `((style ,(format "color: ~a" (color->string (color-property-color v)))))]  | 
 | 178 | +      [(background-color-property? v)  | 
 | 179 | +       `((style ,(format "background-color: ~a" (color->string (background-color-property-color v)))))]  | 
 | 180 | +      [(hover-property? v)  | 
 | 181 | +       `((title ,(hover-property-text v)))]  | 
 | 182 | +      [else null]))  | 
 | 183 | + | 
171 | 184 |   (let ([a (merge-styles  | 
172 | 185 |             #f  | 
173 | 186 |             #f  | 
174 | 187 |             (apply  | 
175 | 188 |              append  | 
176 | 189 |              extras  | 
177 |  | -             (map (lambda (v)  | 
178 |  | -                    (cond  | 
179 |  | -                     [(attributes? v)  | 
180 |  | -                      (map (lambda (v) (list (car v) (cdr v))) (attributes-assoc v))]  | 
181 |  | -                     [(color-property? v)  | 
182 |  | -                      `((style ,(format "color: ~a" (color->string (color-property-color v)))))]  | 
183 |  | -                     [(background-color-property? v)  | 
184 |  | -                      `((style ,(format "background-color: ~a" (color->string (background-color-property-color v)))))]  | 
185 |  | -                     [(hover-property? v)  | 
186 |  | -                      `((title ,(hover-property-text v)))]  | 
187 |  | -                     [else null]))  | 
 | 190 | +             (map (λ (v) (transform-property v default-transform-property))  | 
188 | 191 |                   (style-properties style))))])  | 
189 | 192 |     (let ([name (style-name style)])  | 
190 | 193 |       (if (string? name)  | 
 | 
1830 | 1833 |         `((,(if (eq? 'ordered (style-name (itemization-style t)))  | 
1831 | 1834 |                 'ol  | 
1832 | 1835 |                 'ul)  | 
1833 |  | -           (,@(style->attribs (itemization-style t))  | 
 | 1836 | +           (,@(style->attribs (itemization-style t)  | 
 | 1837 | +                              #:transform-property  | 
 | 1838 | +                              (λ (v transform-property)  | 
 | 1839 | +                                (cond  | 
 | 1840 | +                                  [(itemization-ordered? v)  | 
 | 1841 | +                                   `((start ,(number->string (itemization-ordered-start v))))]  | 
 | 1842 | +                                  [else (transform-property v)])))  | 
1834 | 1843 |             ,@(if (eq? 'compact (style-name (itemization-style t)))  | 
1835 | 1844 |                   `([class "compact"])  | 
1836 | 1845 |                   '()))  | 
 | 
0 commit comments