/// Sunday, April 9

Markdown vs. Markup

Today I stumbled upon Markdown.NET. I've been using my own homegrown text to HTML converter, MGutz.Markup, for a while now. I created a WinForms utility to convert text to HTML on-the-fly giving immediate feedback. I prefer the utility for the generation of plain HTML documents over DreamWeaver. I've changed the utility to support both Markdown and MGutz.Markup.

My disappointment with Markdown is it lacks markup for quick tables. MGutz.Markup supports nested tables as well as nested elements. Overall, Markdown has a cleaner syntax. MGutz.Markup's syntax tries to avoid escaping of characters used in code like '[', ']', '*', '_', '-' and '+'. As a consequence, MGutz.Markup source files are not as eye-friendly.I like Markdown and will probably use it for most day-to-day documents but I use tables a lot. I may change the grammar for MGutz.Markup since most of my code is usually eclosed in <pre></pre> blocks.

I have security concerns about Markdown. It's not suitable for use on Wiki's or CMS web sites as-is. It accepts raw HTML elements which could allow someone to insert javascript. MGutz.Markup, by default, does not allow the insertion of raw HTML elements. The escape sequence in MGutz.Markup tells the lexer to not evaluate the rule. Escaped tag sequences are still processed by HtmlEscape() . MGutz.Markup allows insertion of raw HTML tags only if a developer explicitly sets the EnableRawXml property. Likewise, links will not be generated unless EnableLinks is explicitly set.

Here's a quick comparison of the two:

html output



this is a para

HTML special chars: & < >

this is

HTML special chars: & < >
this is

HTML special chars: & < >



<<google, http://www.google.com>>

  • apple
  • orange
  • pear
- apple
- orange
- pear
// newline not requierd
@- apple 
@- orange 
@- pear
  1. one
  2. two
  3. three
1. one
2. two
3. three
@+ one @+ two @+ three
  1. one
    • apple
  2. two


@+ one @> @- apple @+ two

column heading



C#, Boo





[[* column heading || languages ]]
[[> right || C#, Boo ]]
[[ left ||| centered [[sub-table]] ]]

bold italic code italic bold

_italic_ **bold** `code` _**italic bold**_

**bold** //italic// ::code:: //**italic bold**//

![alt text](http://buttons.blogger.com/bloggerbutton1.gif "Title")


one two three

> one
> two
> three


Take a look a reStructuredText for a lightweight but powerful markup. Writers exist for a variety of formats (and are easy to add).
Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?