on the philosophical aspects of a specification

Seumas Mac Uilleachan seumas at idirect.ca
Thu Mar 6 13:45:47 EST 2008


Waylan Limberg wrote:

> 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!

>

>

Many users (especially where markdown is being used as a plugin for a
blogsite etc) will not even be aware of valid/invalid markup and closing
tags properly or not. Turning *hello **dear* boy** into
<em>hello <strong>dear</strong> boy</em>
makes assumptions about the trailing asterisks and errors in formatting
that are possibly different from the user's intent (like mixing up **
and * to close the tags), and implies an error-checking mechanism built
into markdown to catch such cases.

Maybe what is needed is some kind of syntax checker to run the source
through to point out to users where there are errors and/or confusing
markup. This could be a separate function from markdown itself, like
markdown-lint, or a separate output option of markdown. A separate
function would keep the markdown parser smaller. A syntax checker would
also help users identify what the problem is when they get unexpected
results.


More information about the Markdown-Discuss mailing list