Skip to content

Commit 6eaad6f

Browse files
committed
Some REWRITE-SOURCES updates.
1 parent 8e1da6e commit 6eaad6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

misc.lisp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,16 @@
530530

531531
(defun =location~ (substring)
532532
(lambda (source)
533-
(search substring (location source))))
533+
(ppcre:scan substring (location source))))
534534

535535
(defun http-to-https (source)
536536
(let ((location (ppcre:regex-replace "http://" (location source) "https://")))
537537
(format nil "https ~A" location)))
538538

539539
(defun rewrite-sources (match-fun new-source-fun)
540+
"Rewrite any source that returns TRUE from MATCH-FUN with
541+
NEW-SOURCE-FUN, which should return a single line for use in the
542+
source's source.txt file. Useful for bulk-updating sources."
540543
(map-sources
541544
(lambda (source)
542545
(when (funcall match-fun source)

0 commit comments

Comments
 (0)