on the philosophical aspects of a specification
Waylan Limberg
waylan at gmail.com
Thu Mar 6 10:53:57 EST 2008
On Thu, Mar 6, 2008 at 9:39 AM, Seumas Mac Uilleachan <seumas at idirect.ca> wrote:
> Aristotle Pagaltzis wrote:
> > * Michel Fortin <michel.fortin at michelf.com> [2008-03-05 05:10]:
> >
> >> A better question is what to do with this:
> >>
> >> *hello **dear* boy**
> >>
> >
> > That's a very good question. Here's a counterquestion: what does
> > a human reader see in that text? Based on the visual apperance I
> > think I would make it translate to this:
> >
> > <em>hello <strong>dear</strong> boy</em>
Ah, so your assuming the parser should automatically close unclosed
tags much as a browser in quirks mode does. Sure, you and I understand
how that works, but should we expect authors who are unfamiliar with
html to get that? I doubt it. I also suspect that it's those same
authors that will most likely purposely write a document containing
text formatted like that. I agree with Seumas that such people would
expect:
>
> <em>hello <strong>dear</em> boy</strong>
Yeah, we could give them output that displays as they expect and fix
it under the hood by doing:
> <em>hello <strong>dear</strong></em><strong> boy</strong>
>
But, the output **I** would expect is one of:
<em>hello </em><em>dear</em> boy**
<em>hello **dear</em> boy**
*hello <strong>dear* boy</strong>
Yeah, I think we should force authors to close any tags they open. If
they don't, then the text is assumed to be literal, not markup. Maybe
that's too restrictive for some peoples taste. But that's what I see
when I look at that text. In my mind I keep going back and forth
between the three and can never decide which the author intended.
Finally, I cringe as I realize they probably intended what Seumas
suggested.
If we want to throw valid markup to the wind, then sure, Seumans first
suggestion (and how markdown.pl currently works) is the answer.
Otherwise, any one of my suggestions could be the anwser. This tells
the author (who hopefully is previewing anyway) that they have an
error in their markup and need to make a change. With Aristotle's
suggested output, those unfamiliar with html will, IMO, not be able to
easily discern why the output doesn't match their expectations.
However, by leaving some of the markup literal, they have some clues
to work with.
To me, that is an important factor that seems to be ignored by some
here. Sometimes, IMO, the best thing to do is to pass the markup
through as literal text and give the author a clue that his formatting
is unclear!
--
----
Waylan Limberg
waylan at gmail.com
More information about the Markdown-Discuss
mailing list