Problems with <ins> and <del>

Paul Mucur mudge at waferbaby.com
Sun Jan 23 08:35:52 EST 2005


I tried to format the following text:

	<ins><p>Hello, this whole paragraph has been inserted.</p></ins>

	Hello, just <ins>these words</ins> have been inserted.

	<del><p>This paragraph has been deleted.</p></del>

	This <del>word</del> has been deleted.

I expected the following output:

	<ins><p>Hello, this whole paragraph has been inserted.</p></ins>

	<p>Hello, just <ins>these words</ins> have been inserted.</p>

	<del><p>This paragraph has been deleted.</p></del>

	<p>This <del>word</del> has been deleted.</p>

I actually got:

	<p><ins><p>Hello, this whole paragraph has been inserted.</p></ins></p>

	<p>Hello, just <ins>these words</ins> have been inserted.</p>

	<p><del><p>This paragraph has been deleted.</p></del></p>

	<p>This <del>word</del> has been deleted.</p>

The [HTML 4.01 
Recommendation](http://www.w3.org/TR/html4/struct/text.html#h-9.4) 
states the following with regards to the `ins` and `del` elements:

> These two elements are unusual for HTML in that they may serve as 
> either block-level or inline elements (but not both). They may contain 
> one or more words within a paragraph or contain one or more 
> block-level elements such as paragraphs, lists and tables.

This affects both the Perl and PHP implementations of Markdown.

Thanks,

-- Paul



More information about the Markdown-Discuss mailing list