Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
juerg committed Dec 10, 2023
1 parent df54e2c commit 47d188e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public VncVal apply(final VncList args) {
.map(s -> clip.apply(s))
.flatMap(list -> list.stream())
.map(s -> justify.apply(s))
.collect(Collectors.joining("\n")));
.collect(Collectors.joining(System.lineSeparator())));
}

private static final long serialVersionUID = -1848883965231344442L;
Expand Down
23 changes: 16 additions & 7 deletions src/main/resources/com/github/jlangch/venice/ascii-table.venice
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,23 @@
(def min-col-width 1)
(def min-col-width 80)

(def col { :header "Name"
:footer "Total"
:header-align :left
:data-align :left
:footer-align :left
:overflow :newline
:min-width 1
:max-width 20 } )

(defn render [header data footer]
)

(defn render [columns data]
)

(defn render [cols header body & options]
(let [opts (apply hash-map options)]
))


(defn print-debug-text [text]
(docoll #(println (str "⏵" % "⏴")) (str/split-lines text)))

(defn format-cell [text rows cols width align overflow padding]
(-> (str/align width align overflow text)
(expand-lines rows cols)
Expand All @@ -85,4 +91,7 @@
(count (str/split-lines text)))

(defn ends-with-lf [text]
(str/ends-with? text "\n"))
(str/ends-with? text *newline*))

(defn print-debug-text [text]
(docoll #(println (str "⏵" % "⏴")) (str/split-lines text)))

0 comments on commit 47d188e

Please sign in to comment.