Correcting type error in latex-match: target-url-addr can be a path, which can't be consumed by regexp-replace

original commit: 0a5e92c299c7f2edd8540d1d127f5c887ce750c7
This commit is contained in:
Danny Yoo 2012-07-06 11:48:36 -04:00 committed by Vincent St-Amour
parent 793a83e339
commit e48b814b17

View File

@ -388,7 +388,12 @@
(let ([v (car l)])
(cond
[(target-url? v)
(printf "\\href{~a}{" (regexp-replace* #rx"%" (target-url-addr v) "\\\\%"))
(printf "\\href{~a}{" (regexp-replace* #rx"%"
(let ([p (target-url-addr v)])
(if (path? p)
(path->string p)
p))
"\\\\%"))
(loop (cdr l) #t)
(printf "}")]
[(color-property? v)