# HG changeset patch # User Steve Losh # Date 1715285168 14400 # Node ID d9ae1a68cda2ebb77151e0b3236b8f4f4aa51812 # Parent 90717aee89055324194f69cfbcfa38195bd96bb2 Downcase titles in lookup table I know this isn't i18n friendly, but this thing is only for me and it will make my life significantly easier, so too bad. diff -r 90717aee8905 -r d9ae1a68cda2 mw.lisp --- a/mw.lisp Tue Mar 12 10:24:34 2024 -0400 +++ b/mw.lisp Thu May 09 16:06:08 2024 -0400 @@ -233,7 +233,7 @@ (defun build-title-table (pages) (iterate (for page :in pages) - (for keys = (cons (title page) (extra-titles page))) + (for keys = (mapcar #'string-downcase (cons (title page) (extra-titles page)))) (dolist (key keys) (when-let ((dupe (gethash key result))) (err "Duplicate link title ~S:~% ~A~% ~A~%" @@ -266,7 +266,7 @@ (let* ((text (str:trim (plump:text node))) (href (plump:attribute node "href")) (page (if (str:emptyp href) - (gethash text *title-table*) + (gethash (string-downcase text) *title-table*) (gethash href *slug-table*)))) (if (null page) (progn (err "Can't resolve link in ~A: ~A~%"