div & span support

John Fraser showdown at attacklab.net
Sun Mar 4 20:58:27 EST 2007

John Gruber <gruber at fedora.net> wrote:

> I'm not sure what you're proposing here. You're proposing

> treating the contents of HTML blocks as Markdown even without

> something like a `markdown="1"` attribute?

Yup, that's what I'm proposing. I think the distinction between
span-level elements and block-level elements is artificial; why should
Markdown work in one and not the other? In the end it might not be
possible -- but I think it would be a huge improvement if we can find
a way to do it.

> Really? Why? Seems like not much to ask at all, to me, and also

> makes clear what is going on.

It only makes things clear if users already understand that they can't
use Markdown inside certain kinds of HTML. "Wait, why didn't I need
markdown=1 for that span?" And it turns into a headache if you have
nested blocks; to put `*emphasis*` inside complicated HTML, you need
to add `markdown="1"` to every ancestor up the chain. That will take
some trial and error to figure out.

> I don't see why you'd want that, though. How would you deal with:


> <div class="math">2*2*2 = 8</div>

Same way you deal with this:

<span class="math">2*2*2 = 8</span>

...you screw it up. Markdown is uncanny, but there are going to be
times it does the wrong thing; I don't think it makes sense to have
certain special tag names protect you, and others not. If there's any
way at all to get rid of that distinction, it's worth it.

Yeah, backward compatibility... How often are people putting the
stuff that will confuse Markdown inside HTML? I don't know. But even
if this change is too disruptive for now, I'd love to see it in the
future if you're planning a breaking change.


More information about the Markdown-Discuss mailing list