Skip to content

Commit fd18860

Browse files
committed
WIP: KISS all the complexity away into a json2table module
1 parent 6075b17 commit fd18860

File tree

9 files changed

+172
-490
lines changed

9 files changed

+172
-490
lines changed

Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ LIBJQ_SRC = src/builtin.c src/bytecode.c src/compile.c src/execute.c \
1616
src/jv_unicode.c src/linker.c src/locfile.c src/util.c \
1717
src/jv_dtoa_tsd.c \
1818
src/format_table.c \
19-
src/format_table_input.c src/format_table_render.c \
2019
vendor/decNumber/decContext.c vendor/decNumber/decNumber.c \
2120
${LIBJQ_INCS}
2221

@@ -202,7 +201,7 @@ endif
202201
AM_CFLAGS += $(onig_CFLAGS)
203202

204203
if WITH_ONIGURUMA
205-
TESTS += tests/jqonigtest tests/onigtest tests/manonigtest
204+
TESTS += tests/onigtest tests/manonigtest
206205
endif
207206

208207
### Packaging
@@ -232,8 +231,7 @@ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
232231
tests/onig.supp tests/local.supp \
233232
tests/setup tests/torture/input0.json \
234233
tests/optional.test tests/man.test tests/manonig.test \
235-
tests/jq.test tests/jqonig.test tests/onig.test \
236-
tests/base64.test tests/uri.test \
234+
tests/jq.test tests/onig.test tests/base64.test tests/uri.test \
237235
tests/utf8-truncate.jq tests/jq-f-test.sh \
238236
tests/no-main-program.jq tests/yes-main-program.jq
239237

docs/content/manual/dev/manual.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ sections:
21902190
21912191
* `@table`:
21922192
2193-
The input must be an array of objects or values, and it is
2193+
The input must be an array of values, and it is
21942194
rendered as an ASCII table.
21952195
21962196
* `@sh`:
@@ -2242,8 +2242,8 @@ sections:
22422242
output: ['"This is a message"']
22432243

22442244
- program: '@table'
2245-
input: '[{"a": 1, "b": 2}, {"a": "one", "b": "two"}]'
2246-
output: ['"┌───┬───┐\n│\u001b[1ma\u001b[0m │\u001b[1mb\u001b[0m │\n├───┼───┤\n│1 │2 │\n│one│two│\n└───┴───┘"']
2245+
input: '[["a", 1], ["b", 2]]'
2246+
output: ['"┌─┬─┐\n│a│1│\n│b│2│\n└─┴─┘"']
22472247

22482248
- title: "Dates"
22492249
body: |

jq.1.prebuilt

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)