Closed mfontanini closed 1 month ago
@mfontanini,
It looks pretty good to me as far as most use-cases go! I did notice it has trouble wrapping but looks like that's related to #289
@mfontanini,
It looks pretty good to me as far as most use-cases go! I did notice it has trouble wrapping but looks like that's related to #289
This might actually be a bit problematic for some people. Codeblocks you can manually chunk up, but output of said codeblock is not as easy. The advantage of the previous method was that it was chunked up beforehand with context of the maximum width.
Nice, thanks for testing it! Will fix both issues.
Codeblocks you can manually chunk up, but output of said codeblock is not as easy.
Don't worry, I won't merge until this is fixed. This should not look this way. Btw the changes that I'm adding here will allow simplifying a bunch of things + I think will allow fixing the other issue you created re: splitting long code snippet lines.
Alright, both issues are fixed:
That was fast!
Merging, if anything comes out I can re-visit. There's lots of escape codes missing here so it's possible the output of some tools won't look right.
This processes execution output's ansi escape codes and turns them into
WeightedTexBlock
. This can then be rendered so that we:This needs more testing, I just tested a couple of commands and it works fine but I didn't thoroughly test yet.
This is based on the initial work done on #296.
cc @DrunkenToast @calebdw I would appreciate if you could give this PR a test. It's only handling a very tiny subset of escape codes so I wouldn't be surprised if something failed. At least I tried basic things like
ls --color=always
and piping stuff tololcat
and they both seem to work fine to me.