improve behaviour around indented data

This commit is contained in:
atagen 2024-12-05 22:58:29 +11:00
parent 7146615e04
commit e440fda10c
2 changed files with 19 additions and 11 deletions

View file

@ -4,7 +4,7 @@ let read_all colours =
In_channel.set_binary_mode stdin true;
let open Types in
let t = Emitter.create and culr = Culriser.create colours in
Emitter.serialise t (Ansi [ Fg (Culriser.next culr) ]);
Emitter.serialise t (Ansi [ Fg (Culriser.current culr) ]);
Angstrom_unix.parse_many ~buf_size:4096 Parse.culr_parse
(fun c -> c |> ansi_filter culr |> Culriser.serialise_with_colour culr t)
stdin