on the philosophical aspects of a specification

Michel Fortin michel.fortin at michelf.com
Tue Mar 4 23:08:35 EST 2008


Le 2008-03-04 à 13:15, david parsons a écrit :


> But what's the intent of ***hello*, sailor** ?

>

> Should it produce

> 1. <strong><em>hello</em>, sailor</strong>

> 2. <strong>*hello*, sailor</strong>

> 3. *<strong>hello*, sailor</strong>

> 4. ***hello<em>, sailor<strong>

> 5. ***hello*, sailor**

> 6. <em><strong>hello</strong></em><strong>, sailor</strong>

> 7. <em><strong>hello</em>, sailor</strong> (which makes baby XML

> cry) ?


I'd say 1:

<strong><em>hello</em>, sailor</strong>

This is the saner well-formed markup which can reflect the intent.
This is what PHP Markdown is designed to produce, and it's part of the
test suite in MDTest. 6 is probably acceptable too.

A better question is what to do with this:

*hello **dear* boy**


> How about **Hello, sailor ?

>

> Is it <strong>Hello, sailor, **Hello, sailor, or <em></em>Hello,

> sailor?


Empty emphasis doesn't make sense, it shouldn't be allowed. The first
interpretation is correct.


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




More information about the Markdown-Discuss mailing list