瀏覽代碼

Merge pull request #73 from lukasepple/master

using char instead of aref for getting a char by index
Javier Olaechea 10 年之前
父節點
當前提交
515f93cbd3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/content.lisp

+ 2 - 2
src/content.lisp

@@ -26,7 +26,7 @@
26 26
   "Determine if CHAR is a valid slug (i.e. URL) character."
27 27
   ; use the first char of the general unicode category as kind of
28 28
   ; hyper general category
29
-  (let ((cat (aref (cl-unicode:general-category char) 0))
29
+  (let ((cat (char (cl-unicode:general-category char) 0))
30 30
         (allowed-cats (list #\L #\N))) ; allowed Unicode categories in URLs
31 31
         (cond
32 32
           ((member cat allowed-cats)   t)
@@ -35,7 +35,7 @@
35 35
 
36 36
 (defun unicode-space-p (char)
37 37
   "Determine if CHAR is a kind of whitespace by unicode category means."
38
-  (char= (aref (cl-unicode:general-category char) 0) #\Z))
38
+  (char= (char (cl-unicode:general-category char) 0) #\Z))
39 39
 
40 40
 (defun slugify (string)
41 41
   "Return a version of STRING suitable for use as a URL."