Style fixes and missing closing paren
This commit is contained in:
parent
66928295e3
commit
144cb03294
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue