Bug: INS/DEL in block context (1.04b)

european bob bob at wolfwall.com
Wed Apr 28 11:43:30 EDT 2004


On Wed, 2004-04-28 at 16:14, Jay Allen wrote:
> #2 may also have some unintended consequences since it seems that it 
> will always treat an ins or del as a block-level element.  It is, 
> however, the preferred choice for me (unless John tells me that I'm 
> unleashing some greater form of hell on myself) at this point because 
> 99% of my usage of these tags is block level and there are 
> approximately -- let's see -- an assload of entries in my installation 
> which are affected by this problem.

Wow, this is a problem I didn't even know existed. In fact, there are a
load of tags like this: applet, button, iframe, map, object, script.

How do you tell whether or not a ins/del is a block-level item? Sadly,
this seems horribly complicated. Firstly, if it's inline, it cannot
contain block-level items. Also, if it's within a certain set of block
level items it must be inline, since they cannot contain block level
items (h1, ul, for example). However, there are other tags which can be
treated as block-level because they may contain block-level tags (li, as
an example). 

The problem is that unless its parent is a block level item, it needs to
have a parent block generated for it. xMarkdown has similar issues
deciding whether or not a tag should be reparented in some
circumstances. However, it would probably be easier to code around this
issue in xMarkdown because I get to walk around the document tree :o)

My feeling is that it could probably be punted though: if you're writing
HTML, you ought to know pretty much what you're doing. Markdown should
probably just leave it as it is, and not attempt to give you a parent
block element. 

--bob.



More information about the Markdown-discuss mailing list