Skip to content

Commit fd2c985

Browse files
committed
Make table alignment public again
1 parent 99dab9d commit fd2c985

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

API.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [`->text`](#nextjournal.markdown.transform/->text) - Convert node into text.
1010
- [`default-hiccup-renderers`](#nextjournal.markdown.transform/default-hiccup-renderers)
1111
- [`into-markup`](#nextjournal.markdown.transform/into-markup) - Takes a hiccup vector, a context and a node, puts node's <code>:content</code> into markup mapping through <code>-&gt;hiccup</code>.
12+
- [`table-alignment`](#nextjournal.markdown.transform/table-alignment)
1213
- [`toc->hiccup`](#nextjournal.markdown.transform/toc->hiccup)
1314
- [`nextjournal.markdown.utils`](#nextjournal.markdown.utils)
1415
- [`->zip`](#nextjournal.markdown.utils/->zip)
@@ -151,6 +152,14 @@ Function.
151152
Takes a hiccup vector, a context and a node, puts node's `:content` into markup mapping through [`->hiccup`](#nextjournal.markdown.transform/->hiccup).
152153
<p><sub><a href="https://github.com/nextjournal/markdown/blob/main/src/nextjournal/markdown/transform.cljc#L30-L37">Source</a></sub></p>
153154

155+
## <a name="nextjournal.markdown.transform/table-alignment">`table-alignment`</a>
156+
``` clojure
157+
158+
(table-alignment {:keys [style]})
159+
```
160+
Function.
161+
<p><sub><a href="https://github.com/nextjournal/markdown/blob/main/src/nextjournal/markdown/transform.cljc#L21-L24">Source</a></sub></p>
162+
154163
## <a name="nextjournal.markdown.transform/toc->hiccup">`toc->hiccup`</a>
155164
``` clojure
156165

src/nextjournal/markdown/transform.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[{:as doc :keys [toc]}]
1919
(update doc :content (partial into [] (map (fn [{:as node t :type}] (if (= :toc t) toc node))))))
2020

21-
(defn- table-alignment [{:keys [style]}]
21+
(defn table-alignment [{:keys [style]}]
2222
(when (string? style)
2323
(let [[_ alignment] (re-matches #"^text-align:(.+)$" style)]
2424
(when alignment {:text-align alignment}))))

0 commit comments

Comments
 (0)