views:

966

answers:

5

I want to build a simple cms and I would able to allow the user to input the text with the Markdown syntax (as StackOveflow). There's a c# open sourced library I can use?

+1  A: 

Seems like there's nothing actively maintained out there, though someone has released a library with a blog post entry, called Markdown.NET. See this blog post; the source code is available for download at the bottom.

Noldorin
+3  A: 

I haven't used Milan Negovan's port Markdown.NET, but his latest release is from late 2004. Since then it seems that Brian Jeremy has made a revised version available, which is adopted to the .NET 2.0 Framework.

matpe
+27  A: 

You can of course now use Markdown Sharp which is taken from Stack Overflow (announced here). It's fairly new to the market, meaning its benefited from active development - with the added bonus of being used on a massive and busy site such as Stack Overflow and it's sister sites of Server Fault, Superuser and Meta + those sites that are hosted on StackExchange.com

This is now also available via NuGet (an open source package installer from Microsoft) and therefore can be installed via Visual Studio 2010. Right-click "References" and click "Add Package Reference" and select MarkdownSharp.

Amadiere
While I generally like SO for getting details right, Jeff Atwood is actively hostile to the concept of fixing or even acknowledging edge cases in its two different Markdown implementations, provides clearly hacky workarounds as a "solution", and refers to differences in implementation on babelmark as "the spec" (rather than the actual documentation written by John Gruber). It's certainly a general-use-case capable Markdown interpreter, but I am put off by any treatment of edge-case bugs in any software project or library as anything other than bugs, even if simply acknowledged as "won't fix".
eyelidlessness
For reference: http://meta.stackoverflow.com/questions/38743/adjacent-lists-in-wmd-swallowed-into-a-single-list
eyelidlessness
+2  A: 

The markdown used on StackOverflow is now released under a MIT license. MarkdownSharp. Its fairly new, but should be well tested as it's the same as the one used on all the stack-sites.

Duckers