Remove a git attribute for linguist.

This commit is contained in:
Calvin Rose 2019-10-12 22:03:34 -05:00
parent d47b5f8c6a
commit 5f51476526
3 changed files with 8 additions and 3 deletions

2
.gitattributes vendored
View File

@ -1,2 +0,0 @@
# Use an approximate language for syntax highlighting (clojure is pretty close)
*.janet linguist-language=clojure

View File

@ -406,7 +406,7 @@ static void janet_pretty_one(struct pretty *S, Janet x, int is_dict_value) {
if (S->depth == 0) {
janet_buffer_push_cstring(S->buffer, "...");
} else {
if (!isarray && len >= JANET_PRETTY_IND_ONELINE)
if (!isarray && !(S->flags & JANET_PRETTY_ONELINE) && len >= JANET_PRETTY_IND_ONELINE)
janet_buffer_push_u8(S->buffer, ' ');
if (is_dict_value && len >= JANET_PRETTY_IND_ONELINE) print_newline(S, 0);
for (i = 0; i < len; i++) {

View File

@ -154,6 +154,7 @@
(assert (= (((|||4))) 4) "function shorthand 7")
(assert (= (|(+ $1 $1 $1 $1) 2 4) 16) "function shorthand 8")
(assert (= (|(+ $0 $1 $3 $2 $6) 0 1 2 3 4 5 6) 12) "function shorthand 9")
(assert (= (|(+ $0 $99) ;(range 100)) 99) "function shorthand 10")
# Simple function break
(debug/fbreak map 1)
@ -163,4 +164,10 @@
(debug/unfbreak map 1)
(map inc [1 2 3])
# Simple take, drop, etc. tests.
(assert (deep= (take 10 (range 100)) (range 10)) "take 10")
(assert (deep= (drop 10 (range 100)) (range 10 100)) "drop 10")
(end-suite)