All notable changes to this project are documented here. The format follows Keep a Changelog.
:box, :markdown, :html, and :csv so the breadth of the named
formats is visible at a glance. The dense reference paragraph that
followed it is replaced with four labelled subsections (Rows, Columns,
Format, Extras).cljdoc.org/api/request-build2 after a
Clojars deploy succeeds, so new releases trigger documentation
indexing immediately.CONTRIBUTING.md documents the docs pipeline from release to cljdoc.No library behavior changes; documentation and release-automation only.
Breaking redesign of the high-level table column-spec API. Reading and writing column definitions is now an exercise in saying what you mean.
clj-string-layout.table/table:
:key → :from ("from the row's :foo key"):title → :as ("as the header label "Foo""):format → :formatter (a 1-arg fn applied to the value):format at the spec level is unchanged — it still names the output
style (:markdown, :box, ...). The two roles no longer share a name.:from shortcut for vector rows. Vector rows now
use position-implicit columns: omit :from and the column's source
is its position in :columns.[:qty "Qty"], [:qty "Qty" :right], etc.)
are gone.:invalid-column-spec error type with :column and :reason
fields for malformed column entries.;; before
{:columns [{:key :name :title "Name"}
{:key :qty :title "Qty" :align :right}
{:key :price :title "Price" :align :right
:format #(format "$%.2f" %)}]}
;; after
{:columns [{:from :name :as "Name"}
{:from :qty :as "Qty" :align :right}
{:from :price :as "Price" :align :right
:formatter #(format "$%.2f" %)}]}
;; or, for columns that only need defaults
{:columns [:name :qty :price]}
;; vector rows with per-column options now omit :from
{:columns [{:as "Name"}
{:as "Qty" :align :right}]
:rows [["apple" 12] ["pear" 4]]}
A sed-style migration on a project that didn't use the :format fn
form is essentially :key → :from, :title → :as. If you used
:format inside a column spec, also rename it to :formatter.
:title caption support to the high-level table API, rendered as a centered banner for text formats and as a <caption> element for :html.:footers to the table API, mirroring :headers for totals and trailing rows.:cell-fn decoration callback so per-cell styling (such as ANSI color wrapping) is possible without :raw? true post-processing.:fill? to the table API so generated formats honor :width via fill markers in cell padding.layout-into! and table-into! writer sinks that stream rendered output to a java.io.Writer.parse-row-layout and explain-row-layout so callers no longer have to pass a positional boolean.doc/presets.md) and CLI reference (doc/cli.md).bb bb-format task that runs the CLI in tens of milliseconds with no JVM startup.bb bb-test) that exercises every namespace bb supports.--width CLI flag wired through to fill-aware output formats.(require ...)d directly from a bb script.clj-string-layout.impl.box so presets and the high-level table API share one source of truth for each box style.clj-string-layout.layout compatibility shim from predicates and presets, shrinking the file from 226 lines to 57 while keeping all public aliases.doc/presets.md, CLI reference to doc/cli.md.psql and org preset rule rows so the separator length matches the data row width.:markdown no longer treats the first data row as a header.table/table now throws :invalid-table-column for unknown :align values instead of silently defaulting to left.table/table now throws :empty-table-spec up front when neither :rows, :headers, nor :columns is supplied.:html output now honors :raw?. :width and :display-width are documented as intentionally not applying to structural HTML.clj-string-layout.table APIs with named formats, column specs, map-row support, and overflow policies.:ascii-box and :ascii-double-box table formats with Unicode box-drawing borders.clj-string-layout.width/ansi-width and strip-ansi helpers for ANSI-styled terminal output.codepoint-width, unicode-width, and terminal-width display-width helpers.bb.edn tasks for formatting, testing, linting, and jar builds.:bench alias and benchmark runner for common layout paths.ex-data reference documentation.clj-string-layout.escape/csv-cell for CSV cell escaping.layout-str, layout-seq, parse-layout, and explain-layout public helpers.\f, \F, \{, and \}.:display-width, explicit :col-widths, and :row-count options for wide glyphs and large data sets.clj-string-layout.escape.deps.edn, and tools.build.clojure.test.:repeat-for as the clearer key for repeat-group column predicates while keeping column-layout :apply-for compatibility.version.edn and kept deploy-only dependencies out of normal jar builds.com.github.mbjarland/clj-string-layout to io.github.mbjarland/clj-string-layout.</table>.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |