W3C home > Mailing lists > Public > www-amaya@w3.org > July to September 2009

Splitting and joining <li>s

From: Steven Pemberton <Steven.Pemberton@cwi.nl>
Date: Mon, 07 Sep 2009 15:51:41 +0200
To: "www-amaya@w3.org" <www-amaya@w3.org>
Message-ID: <op.uzv3gfa8smjzpq@steven-750g.ins.cwi.nl>
A problem that I regularly have to deal with (typically turning a text  
file into HTML) is what happens when splitting <li>s.

Take this situation (| is the cursor positioned before "two" within an  
<li>). I want to split the <li> into two <li>s:

	* One |two
	* Three

1. hit return

	* One
	  |two
	* Three

2 So far so good; this I expect. Hit return again (here is where it goes  
wrong):

	* One
	  |
	  two
	* Three

3 This is not what I had expected. However, hit return again:
	* One
	* |
	* two
	* Three

4 Now you have to do a backspace:

	* One |
	* two
	* Three

And you have the result I wanted. I would expect that hitting return in  
step 2 would give me step 4.

The reverse, joining two <li>s works exactly as I would expect it to work.  
Starting from step 4:

* One
* |two
* Three

Hitting backspace gives step 2:

* One
   |two
* Three

Backspace again give step 1:

* One two
* Three

So in short, I would like these two (splitting and joining) to work  
symmetrically.

Thanks!

Best wishes,

Steven Pemberton
Received on Monday, 7 September 2009 13:52:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 September 2009 13:52:26 GMT