Menu

#1816 HTML export: unfolding creates extra line (when wysiwyg=0)

Bug
closed-fixed
5
2016-04-26
2016-03-12
No

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.

Discussion

  • Johannes Sasongko

    This patch sets the display CSS property to empty (i.e. restore original state) when unfolding, instead of setting it to block.

    Result:

    L      ORIGINAL         FOLDED         UNFOLDED
    
    1    - def foo():    + def foo():    - def foo():
    2        bar()                           bar()
    3        baz()         foo()             baz()
    4      foo()                           foo()
    

    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.

     
  • Neil Hodgson

    Neil Hodgson - 2016-03-15
    • labels: --> SciTE, export
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2016-03-15

    Looks good. Committed as [a3022b].

     

    Related

    Commit: [a3022b]

  • Neil Hodgson

    Neil Hodgson - 2016-04-26
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.