Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3 support #1

Merged
merged 1 commit into from Nov 11, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ pom.xml
lib lib
classes classes
.lein-deps-sum .lein-deps-sum
/.lein-failures
4 changes: 2 additions & 2 deletions project.clj
@@ -1,4 +1,4 @@
(defproject doric "0.6.0-SNAPSHOT" (defproject doric "0.6.0-SNAPSHOT"
:description "Clojure table layout" :description "Clojure table layout"
:dependencies [[org.clojure/clojure "1.2.0"] :dependencies [[org.clojure/clojure "1.3.0"]]
[org.clojure/clojure-contrib "1.2.0"]]) :multi-deps {"1.2" [[org.clojure/clojure "1.2.1"]]})
5 changes: 2 additions & 3 deletions src/doric/core.clj
@@ -1,7 +1,6 @@
(ns doric.core (ns doric.core
(:refer-clojure :exclude [format name join split when]) (:refer-clojure :exclude [format name join split when])
(:use [clojure.string :only [join split]]) (:use [clojure.string :only [join split]]))
(:require [clojure.contrib.string :as s]))


(defn- title-case-word [w] (defn- title-case-word [w]
(if (zero? (count w)) (if (zero? (count w))
Expand Down Expand Up @@ -44,7 +43,7 @@


(defn align-cell [col s align] (defn align-cell [col s align]
(let [width (:width col) (let [width (:width col)
s (s/take width s) s (subs s 0 (min (count s) width))
len (count s) len (count s)
pad #(apply str (take % (repeat " "))) pad #(apply str (take % (repeat " ")))
padding (- width len) padding (- width len)
Expand Down