Permalink
Browse files

add ellipsis

  • Loading branch information...
1 parent cc421ca commit de6d23e8e3d95139f460580f99d30db6df5c3c92 @joegallo committed Nov 11, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/doric/core.clj
View
@@ -43,7 +43,9 @@
(defn align-cell [col s align]
(let [width (:width col)
- s (subs s 0 (min (count s) width))
+ s (cond (<= (count s) width) s
+ (:ellipsis col) (str (subs s 0 (- width 3)) "...")
+ :else (subs s 0 width))
len (count s)
pad #(apply str (take % (repeat " ")))
padding (- width len)

0 comments on commit de6d23e

Please sign in to comment.