Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #2 from Goheeca/master

Code tags correction
  • Loading branch information...
commit 24949123485d244c905e5ec9b74d318c9892b8b2 2 parents 57a527d + e4daea4
@vsedach authored
Showing with 8 additions and 4 deletions.
  1. +2 −1  src/markup.lisp
  2. +6 −3 src/wiki.lisp
3  src/markup.lisp
@@ -154,7 +154,8 @@
when (search lang maybe-lang :test #'char-equal)
return (find-symbol lang :keyword))))
(if lang
- #?[<div class="code">${(colorize::html-colorization lang code)}</div>]
+ (let ((colorize::*css-background-class* "nonparen"))
+ #?[<div class="code">${(colorize::html-colorization lang code)}</div>])
#?[<code>${(escape-for-html code)}</code>])))
:simple-calls t :start start :end end)))
9 src/wiki.lisp
@@ -303,14 +303,14 @@
;;; load
-(defun read-file (file)
+(defun read-file (file &optional (empty-file-value nil empty-file-value-p))
(with-open-file (in file :direction :input
:if-does-not-exist :error
:external-format :utf-8)
(let ((*read-eval* nil)
(*readtable* (named-readtables:find-readtable :common-lisp)))
- (read in)))))
+ (read in (not empty-file-value-p) empty-file-value)))))
(defun load-wiki-article (path)
(let* ((article (read-file (merge-pathnames "article" path)))
@@ -331,6 +331,9 @@
;; set up empty file for diff
(open (wiki-path "empty_file") :direction :probe :if-does-not-exist :create)
+ ;; set up empty file for blacklist
+ (open (wiki-path "blacklist") :direction :probe :if-does-not-exist :create)
(map nil #'load-wiki-article (cl-fad:list-directory (wiki-path "articles/")))
(loop for author being the hash-key of (author-index *wiki*)
@@ -342,7 +345,7 @@
(let ((account (read-file afile)))
(setf (gethash (account-name account) (accounts *wiki*)) account)))
- (dolist (banned (read-file (wiki-path "blacklist")))
+ (dolist (banned (read-file (wiki-path "blacklist") nil))
(setf (gethash banned (blacklist *wiki*)) t))

0 comments on commit 2494912

Please sign in to comment.
Something went wrong with that request. Please try again.