File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 109109 (else " " )))
110110
111111(define-public (assoc->html-attr arg)
112- " Converts pairs (a . b) into html attribute strings \" a=\" b\" . "
113- (let* ((key (symbol->string (car arg)))
112+ " Converts pairs (a . b) into html attribute strings \" a=\" b\" . Set a to #f to only output \" b \" . "
113+ (let* ((key (and ( symbol? ( car arg)) ( symbol ->string (car arg) )))
114114 (val (attr-val (cdr arg))))
115- (string-append key " =" (string-quote val))))
115+ (if key
116+ (string-append key " =" (string-quote val))
117+ (string-quote val))))
116118
117119
118120; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Original file line number Diff line number Diff line change 386386 "Custom hugo {{<cite>}} shortcode"
387387 (if (not (hugo-extensions?)) ""
388388 (with citations
389- (map force-string
390- (filter (lambda (x) (and (string? x) (not (string-null? x))))
391- (cdr x)))
389+ (filter (lambda (x) (and (string? x) (not (string-null? x)))) (cdr x))
392390 (md-set 'refs (append (md-get 'refs) citations))
393- (md-hugo-shortcode (cons 'cite citations)))))
391+ (md-hugo-shortcode
392+ (cons 'cite (map (lambda (s) `(#f . ,s)) citations))))))
394393
395394(define (md-cite-detail x)
396395 (if (not (hugo-extensions?)) ""
485484
486485(define (md-sidenote-sub x numbered?)
487486 (if (hugo-extensions?)
488- (let ((numbered (if numbered? '((numbered "numbered")) '()))
487+ (let ((numbered (if numbered? '((numbered . "numbered")) '()))
489488 (args (cdr x)))
490489 (md-hugo-shortcode
491- (append `(sidenote (halign ,(md-marginal-style (first args)))
492- (valign ,(md-marginal-style (second args))))
490+ (append `(sidenote (halign . ,(md-marginal-style (first args)))
491+ (valign . ,(md-marginal-style (second args))))
493492 numbered)
494493 (third args)))
495494 (serialize-markdown* `(footnote ,(third (cdr x))))))
You can’t perform that action at this time.
0 commit comments