Permalink
Browse files

Correcting type error in latex-match: target-url-addr can be a path, …

…which can't be consumed by regexp-replace
  • Loading branch information...
1 parent 29c83cd commit e3cd23266d898114f8558036d32990088234e402 Danny Yoo committed Jul 6, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 collects/scribble/latex-render.rkt
@@ -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)

0 comments on commit e3cd232

Please sign in to comment.