matijapretnar/eff

Incorrect display of lists in online version

Closed this issue · 2 comments

If you enter a list such as [1; 2; 3], the closing bracket is missing. Things get weirder with nested lists. The problem seems to lie in the color formatting syntax of jQuery terminal.

For me nested lists are still not printed at all or is extremely strange in the online demo:

# let asd = with choose_all handle
 let x = choose_int 0 5 in
 let y = choose_int 1 x in
 [x;y]
val asd : int list list = [[1; 1]; [2; 1]; [2; 2]; [3; 1]; [3; 2]; [3; 3];
                           [4; 1]; [4; 2]; [4; 3]; [4; 4]; [5; 1]; [5; 2];
# with choose_all handle
 let x = choose_int 0 5 in
 let y = choose_int 1 x in
 [x;y]

<Nothing is printed>

# [[1]]

...
- : int list list = 
- : int = 1
- : int = 1
- : int = 1
- : int = 1
- : int = 1
- : int list list = 
- : int = 1
- : int = 1
- : int = 1
- : int = 1
- : int list list = 
- : int = 1
- : int = 1
- : int = 1
- : int list list = 
- : int = 1
- : int = 1
- : int list list = 
- : int = 1
- : int list list = 
# 
 

This is indeed very weird.

Evaluating [[1]] actually crashes my browser. I'll take a look into it.