Re: Markdown RFC?

2008-02-19 Thread Yuri Takhteyev
  As in I Don't Give a Rip?

As in I could care less, which is explained very well by Steven
Pinker in The Language Instinct.  See
http://ling.kgw.tu-berlin.de/lexicography/data/MAVENS.html and search
for could care less.

- yuri
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown RFC?

2008-02-19 Thread Petite Abeille


On Feb 19, 2008, at 3:00 AM, John Gruber wrote:


I could give a rip about formal specifications, truth be told.


As in I Don't Give a Rip?

Confused.

--
PA.
http://alt.textdrive.com/nanoki/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Markdown RFC?

2008-02-18 Thread Petite Abeille

Hello,

Has anyone considered writing a formal specification for Markdown?

Why specs matter
http://diveintomark.org/archives/2004/08/16/specs

Thoughts?

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown RFC?

2008-02-18 Thread Andrea Censi
On Feb 18, 2008 2:31 PM, Petite Abeille [EMAIL PROTECTED] wrote:
 Has anyone considered writing a formal specification for Markdown?

Yes, it's called Markdown.pl g.

In a nutshell: given that Markdown.pl (and straight ports of it) do
processing using multiple passes of regex/replace, you cannot find a
syntax that captures Markdown.pl's behavior exactly.

In my own Maruku, which uses a parser, I still have to figure out all
the subtleties in handling nested lists. I kind of gave up, because I
did not see the point in emulating all border cases (and bugs) in
Markdown.pl.

-- 
Andrea Censi
PhD student, Control  Dynamical Systems, Caltech
http://www.cds.caltech.edu/~andrea/
Life is too important to be taken seriously (Oscar Wilde)
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown RFC?

2008-02-18 Thread Waylan Limberg
On Feb 18, 2008 5:59 PM, Andrea Censi [EMAIL PROTECTED] wrote:
 On Feb 18, 2008 2:31 PM, Petite Abeille [EMAIL PROTECTED] wrote:
  Has anyone considered writing a formal specification for Markdown?

 Yes, it's called Markdown.pl g.

I have to respectfully disagree. Mr. Gruber himself has said a few
times on this list that just because markdown.pl does something
doesn't mean it's right. In fact, my recollection is that he indicated
the syntax rules are the final authority and that markdown.pl fails in
some instances. Interestingly, most of the direct ports fail in
those same instances. Sorry, I can't recall any specific example at
this time as I don't use one of those direct ports.

Of course, the problem is that the syntax rules are a little vague
from time to time and in some instances are open to multiple
interpretations. However, given the philosophy behind why J.G. created
Markdown, I don't know that such a strict specification is desirable
in this instance. If you search the archives, you'll find previous
discussions on this.
-- 

Waylan Limberg
[EMAIL PROTECTED]
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Markdown RFC?

2008-02-18 Thread Allan Odgaard

On 18 Feb 2008, at 23:59, Andrea Censi wrote:


[...]
In a nutshell: given that Markdown.pl (and straight ports of it) do
processing using multiple passes of regex/replace, you cannot find a
syntax that captures Markdown.pl's behavior exactly.


I did a rule-based implementation which I have unfortunately since  
lost¹.


A rule had 4 elements to it:

1. A regexp that makes the parser enter the context the rule  
represents (e.g. block quote, list, raw, etc.).


2. A list of which rules are allowed in the context of this rule.

3. A regexp for leaving the context of this rule.

4. A regexp which is pushed onto a stack when entering the context of  
this rule, and popped again when leaving this rule.


The fourth item here is really the interesting part, because it is  
what made Markdown nesting work (99% of the time) despite this being  
100% rule-driven.


The implementation of this did disagree with Markdown.pl on various  
edge cases, but the spirit of Markdown was definitely there and it  
felt way more predictable and flexible (e.g. you can have block quote  
go directly after starting a list item, etc.)


It does however take a “no look-ahead”-approach, so e.g. `_` will  
always enter emphasis, regardless of whether or not there is a closing  
`_` later in the document.





¹ My main machine broke so I was working on a spare laptop while  
waiting for a replacement, and it was on this machine I wrote the  
Markdown parser, but I am afraid that the laptop saw a clean install  
before I was able to copy the source to another machine :/


___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss