Multidingus

John MacFarlane jgm at berkeley.edu
Fri Oct 19 16:53:26 EDT 2012


I've added peg-markdown, RedCarpet, and PythonMarkdown (thanks
Waylan). I've also changed the display format so that implementations
with identical output are consolidated.

Some fun examples to see how useful this can be:

http://johnmacfarlane.net/babelmark2/?text=%2B+++item+1%0D%0A%0D%0A++++%2B+++item+2%0D%0A%0D%0A+*+++*+++*+++*+++*

http://johnmacfarlane.net/babelmark2/?text=x%3Cmax%3Ccode%3Ea%2Cb%3C/code%3E%0D%0A

http://johnmacfarlane.net/babelmark2/?text=***bold**+in+ital*%0A%0A***ital*+in+bold**

http://johnmacfarlane.net/babelmark2/?text=+8.+item+1%0A+9.+item+2%0A10.+item+2a

http://johnmacfarlane.net/babelmark2/?text=-+foo%0A-+bar%0A%0A1.+first%0A2.+second%0A

http://johnmacfarlane.net/babelmark2/?text=%5Bhi%5D+(%2Furl)%0A

http://johnmacfarlane.net/babelmark2/?text=%5Bhi%5D(%2Furl(with+parens))%0A

http://johnmacfarlane.net/babelmark2/?text=%5Bthis+%60is+a%5D+link%60+with+backticks%5D(%2Furl)%0A

http://johnmacfarlane.net/babelmark2/?text=%3CDIV%3E%0Ahi%0A%3C%2FDIV%3E%0A

http://johnmacfarlane.net/babelmark2/?text=%5BBei%C3%9F+nicht+in+die+Hand%2C+die+dich+f%C3%BCttert%5D%5B%5D%0A%0A%5BBEI%C3%9F+NICHT+IN+DIE+HAND%2C+DIE+DICH+F%C3%9CTTERT%5D%3A+http%3A%2F%2Fen.wikiquote.org%2Fwiki%2FGerman_proverbs%0A

http://johnmacfarlane.net/babelmark2/?text=1.+one%0A%0A2.+two%0A3.+three%0A

John

+++ John MacFarlane [Oct 19 12 11:01 ]:

> I've added Markdown 1.0.1, changed the title to BabelMark 2 (which is

> too good a name not to use), and moved the thing to

>

> http://johnmacfarlane.net/babelmark2/

>

> Also added a title tag.

>

> So far we have pandoc, php markdown + extra, and both versions of

> Markdown.pl. Anyone else want to implement a dingus server?

> I will probably make minor changes to the protocol in the next

> few days, but for now what you need is something that converts the

> contents of the 'text' parameter to HTML and returns a JSON object with

> the fields 'name', 'html', and 'version'. Example:

>

> $ curl 'http://johnmacfarlane.net/cgi-bin/pandoc-dingus?text=hi'

> {"name":"Pandoc","html":"<p>hi</p>","version":"1.9.4.2"}

>

> +++ Michel Fortin [Oct 19 12 07:31 ]:

> > Le 2012-10-18 à 15:24, John MacFarlane <jgm at berkeley.edu> a écrit :

> >

> > > I've implemented a version of what I described below.

> > > http://johnmacfarlane.net/pandoc/dingus.html

> >

> > I see you've now added Markdown.pl 1.0.2b8, which is the latest non-public release made by John Gruber. Maybe you should add 1.0.1 too, like I've done for Babelmark, because it's the latest public release and it is probably the one in more widespread use. 1.0.2b8 and 1.0.1 do exhibit significant differences in some areas.

> >

> > For instance, we were just talking about parens inside URLs and I just noticed that 1.0.2b8 does balance them correctly:

> > <http://babelmark.bobtfish.net/?markdown=%28%5Btest%5D%28url.with%28paren%29%29%29&src=1&dest=2>

> >

> > The HTML block parser was also completely redone in 1.0.2b4. Look at the changelog for for details (reproduced at the end of this email).

> >

> > > Also, perhaps "dingus" isn't the best word for it, since it

> > > just displays the HTML source, not the formatted output. I take

> > > it that's what we want, since this is intended primarily for

> > > comparing the output of different implementations on corner

> > > cases, not for users to get a feel for markdown.

> >

> >

> > If you want to call it Babelmark 2, you have my permission. I think it'll be a worthy successor. Also, you really ought to have a <title> tag on your page.

> >

> >

> > ## Changelog found in 1.0.2b8 ##

> >

> > 1.0.2b8 - Wed 09 May 2007

> >

> > + Fixed bug with nested raw HTML tags that contained

> > attributes. The problem is that it uses a backreference in

> > the expression that it passes to gen_extract_tagged, which

> > is broken when Text::Balanced wraps it in parentheses.

> >

> > Thanks to Matt Kraai for the patch.

> >

> > + Now supports URLs containing literal parentheses, such as:

> >

> > http://en.wikipedia.org/wiki/WIMP_(computing)

> >

> > Such parentheses may be arbitrarily nested, but must be

> > balanced.

> >

> >

> > 1.0.2b7

> >

> > + Changed shebang line from "/usr/bin/perl" to "/usr/bin/env perl"

> >

> > + Now only trim trailing newlines from code blocks, instead of trimming

> > all trailing whitespace characters.

> >

> >

> > 1.0.2b6 - Mon 03 Apr 2006

> >

> > + Fixed bad performance bug in new `Text::Balanced`-based block-level parser.

> >

> >

> > 1.0.2b5 - Thu 08 Dec 2005

> >

> > + Fixed bug where this:

> >

> > [text](http://m.com "title" )

> >

> > wasn't working as expected, because the parser wasn't allowing for spaces

> > before the closing paren.

> >

> >

> > 1.0.2b4 - Thu 08 Sep 2005

> >

> > + Filthy hack to support markdown='1' in div tags, because I need it

> > to write today's fireball.

> >

> > + First crack at a new, smarter, block-level HTML parser.

> >

> > 1.0.2b3 - Thu 28 Apr 2005

> >

> > + _DoAutoLinks() now supports the 'dict://' URL scheme.

> >

> > + PHP- and ASP-style processor instructions are now protected as

> > raw HTML blocks.

> >

> > <? ... ?>

> > <% ... %>

> >

> > + Workarounds for regressions introduced with fix for "backticks within

> > tags" bug in 1.0.2b1. The fix is to allow `...` to be turned into

> > <code>...</code> within an HTML tag attribute, and then to turn

> > these spurious `<code>` tags back into literal backtick characters

> > in _EscapeSpecialCharsWithinTagAttributes().

> >

> > The regression was caused because in the fix, we moved

> > _EscapeSpecialCharsWithinTagAttributes() ahead of _DoCodeSpans()

> > in _RunSpanGamut(), but that's no good. We need to process code

> > spans first, otherwise we can get tripped up by something like this:

> >

> > `<test a="` content of attribute `">`

> >

> >

> > 1.0.2b2 - 20 Mar 2005

> >

> > + Fix for nested sub-lists in list-paragraph mode. Previously we got

> > a spurious extra level of `<p>` tags for something like this:

> >

> > * this

> >

> > * sub

> >

> > that

> >

> > + Experimental support for [this] as a synonym for [this][].

> > (Note to self: No test yet for this.)

> > Be sure to test, e.g.: [permutations of this sort of [thing][].]

> >

> >

> > 1.0.2b1 - 28 Feb 2005

> >

> > + Fix for backticks within HTML tag: <span attr='`ticks`'>like this</span>

> >

> > + Fix for escaped backticks still triggering code spans:

> >

> > There are two raw backticks here: \` and here: \`, not a code span

> >

> > 1.0.1 - 14 Dec 2004

> >

> > 1.0 - 28 Aug 2004

> >

> > --

> > Michel Fortin

> > michel.fortin at michelf.ca

> > http://michelf.ca/

> >

> > _______________________________________________

> > Markdown-Discuss mailing list

> > Markdown-Discuss at six.pairlist.net

> > http://six.pairlist.net/mailman/listinfo/markdown-discuss

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss



More information about the Markdown-Discuss mailing list