Style fixes and missing closing paren

This commit is contained in:
Javier Olaechea 2014-12-10 12:16:31 -05:00
parent 66928295e3
commit 144cb03294

View file

@ -24,8 +24,8 @@
(defun slug-char-p (char &key (allowed-chars (list #\- #\~))) (defun slug-char-p (char &key (allowed-chars (list #\- #\~)))
"Determine if CHAR is a valid slug (i.e. URL) character." "Determine if CHAR is a valid slug (i.e. URL) character."
; use the first char of the general unicode category as kind of ;; use the first char of the general unicode category as kind of
; hyper general category ;; hyper general category
(let ((cat (char (cl-unicode:general-category char) 0)) (let ((cat (char (cl-unicode:general-category char) 0))
(allowed-cats (list #\L #\N))) ; allowed Unicode categories in URLs (allowed-cats (list #\L #\N))) ; allowed Unicode categories in URLs
(cond (cond
@ -42,7 +42,7 @@
(let ((slugified (remove-if-not #'slug-char-p (let ((slugified (remove-if-not #'slug-char-p
(substitute-if #\- #'unicode-space-p string)))) (substitute-if #\- #'unicode-space-p string))))
(if (zerop (length slugified)) (if (zerop (length slugified))
(error "Post title '~a' does not contain characters suitable for a slug!" string (error "Post title '~a' does not contain characters suitable for a slug!" string )
slugified))) slugified)))
;; Content Types ;; Content Types