Empty list elements in Kupu

Bug #101514 reported by Jan-Wijbrand Kolman
8
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Medium
Unassigned

Bug Description

Not sure if this some 'solvable', anyway a report from WU Wien:

I think that this small problem has its roots in how browsers handle empty
list elements. there also seems to be one small Kupu issue.

Actually when you press tab twice, Kupu inserts an element in the "missed
out" level automatically after saving.

[IN KUPU]
o Level 1
  * Level 2
    - Level 3
o Level 1
    - Level 3

gets changed to:
o Level 1
  * Level 2
    - Level 3
o Level 1
  *
    - Level 3

after saving. Unfortunately one cannot edit the missing Level 2 item (in
this example).

[IN LAYOUT]
the above example looks like:

o Level 1
  * Level 2
    - Level 3
o Level 1
  * - Level 3

I quickly browsed through the source code and my (quick and dirty)
approach was to insert a " " after the empty list element and the
result was OK. So this might be a work-around. Of course I can hardly
estimate if its possible to check wheather a list element is empty and
insert a   if that's the case...

Tags: kupu
Changed in silva:
assignee: guido-infrae → aaltepet
Revision history for this message
Andy Altepeter (aaltepet) wrote :

It looks using a KupuContentFilters to catch this before the content is sent to Silva (on save) is the best way to go. I thought about adjusting the transformations (coming from kupu) but that's very difficult. Also, I tried implementing JW's suggestion of inserting an   before the nested list, but that led to extra spacing/artifact. It would be nice if there was a way to leverage sarissa's xpath capabilities in order to quickly locate relevant list items.

Revision history for this message
Andy Altepeter (aaltepet) wrote :

I checked in a contentfilter that fixes these empty list elements under most circumstances. I was not able to do nested lists in IE (tab wouldn't work), and I can't test safari.

Changed in silva:
status: New → Fix Committed
Changed in silva:
milestone: none → 2.1
Changed in silva:
assignee: aaltepet → nobody
Changed in silva:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.