
Elegant Markdown for a more civilized age - tanoku
http://blog.vmarti.net/2011/08/03/elegant-markdown.html
======
autarch
Wow, what a crazy idea. Decoupling parsing from output generation. What will
those crazy Ruby kids think of next?

~~~
stephth
47 comments in this thread and this is the top comment. Could someone explain
what value it adds to the conversation? I'm completely missing it.

~~~
pyre
It allows _real_ computer scientists to laugh at stupid webdevs reinventing
the wheel. </sarcasm>

(Except no one was claiming that it was a novel idea, just that in the past,
most Markdown processors just convert directly between Markdown and HTML, but
now they are changing that. It's also funny that there seems to be some
animosity in that post towards Ruby programmers for whatever reason. It's not
like Markdown is an invention of Ruby, the reference implementation was
written in Perl.)

~~~
pshangov
Also, fore a more robust and extensible Markdown parser, see the perl's
Markdent: <http://search.cpan.org/dist/Markdent/>

------
joehewitt
I recently wrote something just like this for Node.js:

<https://github.com/joehewitt/markdom>

It's used on <http://uponahill.com> to extract Flickr urls so I can query the
Flickr API and get complete metadata about each photo. My gf, who does most of
the writing/photography on the site, has found writing in Markdown and
copy/pasting Flickr urls a pretty frictionless experience compared to the
Wordpress CMS.

~~~
benatkin
Darn...I was hoping it was pure javascript so I could run it client-side.
Nicely done, though!

~~~
stock_toaster
You could try markdownjs[1].

[1]: <https://github.com/evilstreak/markdown-js>

~~~
benatkin
I already know about that and I like it. I wanted to see a different take on
it, though!

I'm going to take another look at it soon.

------
pavel_lishin
At a certain point, isn't it easier to just write the HTML?

~~~
arkitaip
This. I find markdown and all its bastards insufficient and their syntax hard
to remember. Sometimes you can use _ other times it's * and none of them are
more intuitive that <em> or <bold>.

~~~
veeti
Actually, it's <strong> and not <bold> ;)

~~~
arkitaip
Can't believe I made that mistake ;)

------
rednaught
Is there any consensus on an improved/extended Markdown? Between
MultiMarkdown, Github Flavored Markdown, Stack Exchange's additions, this new
"elegant" markdown and others there seems to be bit of fragmentation in this
idea of a simple markup.

~~~
tanoku
No, there isn't really a consensus. FWIW, this is not a "new elegant
Markdown", this is a 100% standards compilant Markdown library, with optional
support for _some_ extensions that we found useful. The syntax for these
extensions comes, basically, from the Markdown mailing list and PHP-Markdown
Extra.

~~~
technomancy
> this is a 100% standards compilant Markdown library

Eh, what's that now? Isn't Markdown implementation-defined? I wasn't aware
there was a spec, I thought it was just some notes on a dude's blog.

~~~
guywithabike
I think the "Markdown standard" could be considered to be Gruber's official
docs: <http://daringfireball.net/projects/markdown/syntax>

------
rednaught
Just curious if there was a reason why this is not on the official Github
blog?

------
stephth
Speaking of Markdown and Github, has anyone figured out a way to preview
locally - with accuracy - how README.mdown files will look on the project
page? Would Redcarpet 2 help solve this problem?

------
FSX
Nice. I like the idea with the renderers. I'm going to this idea a try too for
my Python binding.

------
dotemacs
Redcarpet is great, but for code highlighting you can use pygments.rb, which
has an embedded python in it and is therefore faster than albino.

Check it out: <https://github.com/tmm1/pygments.rb>

------
sukuriant
Am I the only one that found the font on that page distracting?

------
mcburton
excellent. Maybe now there well be an elegant way to go from .markdown to
.docx

~~~
sharkbrainguy
Pandoc does that already <http://johnmacfarlane.net/pandoc/>

Pandoc is written in haskell but there's c bindings to it
<https://github.com/toyvo/libpandoc> so you can use it from anywhere.

------
Kwpolska
Someone shall port this to Python (and possibly PHP).

