Steps to reproduce:
(1) Add the following properties:
export.html.folding=1 export.html.wysiwyg=0
(2) Open a file that has foldable blocks, e.g. this Python code:
def foo(): bar() baz() foo()
(3) Export to HTML and open it.
(4) Click the fold header twice to fold and unfold it.
Result:
L ORIGINAL FOLDED UNFOLDED 1 - def foo(): + def foo(): - def foo(): 2 bar() bar() 3 baz() foo() baz() 4 foo() 5 foo()
This does not happen when export.html.wysiwyg=1
.
This patch sets the
display
CSS property to empty (i.e. restore original state) when unfolding, instead of setting it toblock
.Result:
Note that a new line is still inserted in the folded state, but fixing that is going to be more complicated and probably not worth the effort.
Looks good. Committed as [a3022b].
Related
Commit: [a3022b]