Skip to content

Commit

Permalink
Merge pull request #25 from ljanyst/table-class
Browse files Browse the repository at this point in the history
Make it possible to customize table class
  • Loading branch information
3b committed Jun 29, 2016
2 parents 05aa8c0 + 5bfaa22 commit 6a6bd47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tables.lisp
Expand Up @@ -24,11 +24,13 @@
;; | zebra stripes | are neat | $1 |

(defpackage #:3bmd-tables
(:export #:*tables*))

(:export #:*tables*
#:*table-class*))

(in-package #:3bmd-grammar)

(defparameter 3bmd-tables:*table-class* nil
"Table class to be used in the rendered HTML")

(defrule table-cell (and #\|
sp
Expand Down Expand Up @@ -79,7 +81,7 @@

(defmethod print-tagged-element ((tag (eql 'table)) stream rest)
(padded (1 stream)
(format stream "<table>"))
(format stream "<table ~@[class=\"~a\"~]>" 3bmd-tables:*table-class*))
(when (getf rest :head)
(padded (1 stream)
(format stream "<thead>"))
Expand Down

0 comments on commit 6a6bd47

Please sign in to comment.