MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

Skip empty output text blocks?

Open zmoon opened this issue 1 year ago • 3 comments

Context

With Rich progress bars, extra empty output blocks are produced.

For example:

image

The empty blocks each consist of two

<div class="output text_html">
  <pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"></pre>
</div>

I'll try to come up with a minimal example with code...

Proposal

It would be nice for such empties to be skipped, perhaps optionally.

Tasks and updates

No response

zmoon avatar Apr 16 '24 20:04 zmoon

@zmoon - Have you tried nb_merge_streams = True? I got reasonably nice results for some notebooks that previously were super ugly. And if that doesn't help, could you please try using the master branch? we merged a possibly related fix today from https://github.com/executablebooks/MyST-NB/pull/604.

bsipocz avatar Sep 20 '24 03:09 bsipocz

Hi @bsipocz , I tried nb_merge_streams = True and got the same results (myst-nb 1.0.0 and in 1.1.1 as well). With current master branch, also same results, regardless of nb_merge_streams setting.

zmoon avatar Sep 23 '24 15:09 zmoon

Any followup?

Mr-Milk avatar Jun 04 '25 14:06 Mr-Milk