Catgut

Catgut is a small markdown engine. It takes simple, mom- and boss-friendly text like this:

/This/ is a /test/ of stuff for _catgut_.

	Blockquotes, anyone?

!Headers like this.

(Note we start off at h2, since the title up there is already at h1.)

---------

!!Smaller headers like this.

This is a "test of quotes. It was 2" high."
Curly, huh?

Catgut will -fix your /broken nesting- for you/.

This is a 'test of single quotes. It was 3' deep.'

Apostrophes? I'd like me some of them.
           
'Apostrophes? I'd like me 15' of them.'

'Those would be Nicholas' files.'

So I -think I should be able to do /emphasized text/ inside of strong- text.
So I /think I should be able to do -strong text- inside of emphasized/ text.
And maybe I can do /-both-/ at -/once./-

It's totally doing that ... thing with the ellipses.... Also -- if you'll pardon a digression--em- and en-dashes.

Bracket links work [http://nick.panharmonicon.com/|like this]. Send feedback to [nick@panharmonicon.com].

And turns it into proper XHTML like this:

This is a test of stuff for catgut.

Blockquotes, anyone?

Headers like this.

(Note we start off at h2, since the title up there is already at h1.)


Smaller headers like this.

This is a “test of quotes. It was 2" high.”
Curly, huh?

Catgut will fix your broken nesting for you.

This is a ‘test of single quotes. It was 3' deep.’

Apostrophes? I’d like me some of them.

‘Apostrophes? I’d like me 15' of them.’

‘Those would be Nicholas’ files.’

So I think I should be able to do emphasized text inside of strong text.
So I think I should be able to do strong text inside of emphasized text.
And maybe I can do both at once.

It’s totally doing that … thing with the ellipses…. Also – if you’ll pardon a digression—em- and en-dashes.

Bracket links work like this. Send feedback to nick@panharmonicon.com.

You can have a gander at the source, if you like. This is the minimal core, intended to be dropped into content management systems, which will provide the text storage and retrieval, input gathering, etc. As you can see, it's very extensible. CMS administrators with basic HTML skills can override the default set of replacement tags via the filters array. More advanced users can extend the markdown with new regular expressions and custom callback functions.