Splitting and joining <li>s

"Steven Pemberton" <[email protected]>
Newsgroups gmane.comp.web.amaya.general
Organization CWI/W3C
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.