Problems with <ins> and <del>

Michel Fortin michel.fortin at michelf.com
Sun Jan 23 09:30:32 EST 2005


Hi Paul,

Try writing this instead:

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

To be taken as block elements by Markdown, "ins" and "del" need to be 
alone on their line. If they are not, they are considered span 
elements.

* * *

Of course it would work on one line if Markdown saw the "p" tag inside 
it as a block. This may be part of a future version since it *almost* 
work on my PHP Markdown experimental branch (choose MD Experimental on 
the PHP Markdown dingus page). But it currently fail to swap back the 
hash value for the paragraph, so the result looks ugly.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/

Le 23 janv. 2005, à 8:35, Paul Mucur a écrit :

> 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
>
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>



More information about the Markdown-Discuss mailing list