fix non-symbolic template replacements causing error on expansion

symbol->string doesn't work for anything besides synmols. And not
any (not (list? ...)) is a symbol. String are not, for example.
This commit is contained in:
alex-eg
2025-06-14 17:08:18 +03:00
parent df9c62ffa4
commit bb3d7c1d3e

View File

@@ -25,7 +25,7 @@
(fmt #f "([^\\-]?)" (symbol->string (car x)) "([\\-$]?)") (fmt #f "([^\\-]?)" (symbol->string (car x)) "([\\-$]?)")
(fmt #f "\\1" (symbol->string (cdr x)) "\\2")) (fmt #f "\\1" (symbol->string (cdr x)) "\\2"))
x)) x))
(filter (fn (not (list? (cdr x)))) subst-alist)))) (filter (fn (symbol? (cdr x))) subst-alist))))
(string->symbol (string->symbol
(string-substitute* str subst-map)))) (string-substitute* str subst-map))))