On 7 Oct 2006, at 20:10, John Gruber wrote:

Allan Odgaard <[EMAIL PROTECTED]> wrote on 10/7/06 at 6:27 AM:

Noticed the patterns for setext style headings are:
      ^(.+)[ \t]*\n=+[ \t]*\n+
  Should be:
      ^(.+?)[ \t]*\n=+[ \t]*\n+

Why? I can't see where this would make a difference.

Not sure that it would but I've read in several places that non greedy should be used whereever it can as it's more efficient for the regex parser and processor. Don't have any benchmarks to back this up but I'm sure it says so in the mastering regex book.

Angie


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

Reply via email to