Why double-spaced?

Hi everyone

I am using the two attached tiddlers together. One has buttons to open or close all details elements in an outline. The other is an action-show-details thingy that makes the buttons work.

If I just open an item in the outline manually, the elements below it will be single-spaced. Yay. But if I use the buttons to open all, everything is double-spaced. Boo.

Test it yourself: go to https://giffmex.org/experiments/outlining.NT3.general.epistles.html#James%20introduction and try clicking items in the outline. Nice single-spaced outline. Then try clicking the down button in the sidebar. Double-spaced.

Is there a way to make it so that clicking the buttons will display the outline single-spaced like the manually opened results are?

The tiddlers that control the buttons are: this and this

It seems you can click on elements that have no child elements. If you click one of them manually, it shows some extra space with no content.

The “expand all” activate that behaviour, that’s why it looks like if they are “double spaced”. They aren’t – They show an empty child list.

Ah, that explains it. So if I want to print a single-spaced version I will need to expand all, then go through and close the empty ones…

I did not have a closer look at the code, but it may be possible to check if an element has children before you change the open state.