Skip to content

Commit

Permalink
require colorize 0.2.2; use coloring-type-exists?
Browse files Browse the repository at this point in the history
  • Loading branch information
ursetto committed Sep 1, 2010
1 parent 76f4429 commit 2328871
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chickadee.meta
Expand Up @@ -8,7 +8,7 @@
(spiffy 4.8) spiffy-request-vars
html-tags html-utils
(chicken-doc 0.4.0)
sxml-transforms uri-generic (chicken-doc-admin 0.3.13) colorize ; chicken-doc-html
sxml-transforms uri-generic (chicken-doc-admin 0.4.0) (colorize 0.2.2) ; chicken-doc-html
)
(files "chickadee.scm" "chickadee-driver.scm"
"chickadee.css" "chicken-doc-html.scm"
Expand Down
4 changes: 1 addition & 3 deletions chicken-doc-html.scm
Expand Up @@ -310,14 +310,12 @@
"</table>\n")))

(highlight . ,(lambda (t b s)
(define (coloring-type? t)
(assq t (coloring-type-names)))
(match b ((lang . body)
(let ((lang (and lang (string->symbol
(string-downcase
(->string lang))))))
(if (and lang ;; lang #f not currently possible; reserved for future
(coloring-type? lang))
(coloring-type-exists? lang))
(list "<pre class=\"highlight\">"
(html-colorize lang
;; html-colorize quotes HTML; don't walk
Expand Down

0 comments on commit 2328871

Please sign in to comment.