

Ask YC: Textile vs Markdown - sant0sk1

I'm sick of writing html tags. It is a bore, even when using my favorite editors (vim, textmate).<p>I've been considering the pros and cons of the 2 most popular lightweight markup languages, but can't seem to pull the trigger one way or the other.<p>I realize that ultimately it comes down to personal taste, like vim vs emacs, but I'd still like some external input. What do you prefer and why?
======
drewp
Don't forget the costs of using a "lightweight" markup:

You have to learn some new system of quoting and escaping. I don't know
textile or markdown, but I just went over to
<http://textism.com/tools/textile/index.php> and tried to put a </code> close
tag inside the sample code. It's got problems.

You get approximately one chance at a correct conversion to a richer format:
converting to html. Nearly any other conversion, such as from the wrong
lightweight markup to another lightweight markup, is lossy.

These markups aren't very extensible. They can't store metadata (e.g.
microformats), or if they do, it tends to be by allowing html tags mixed into
the markup, which means we're back into quoting/escaping issues.

There tend not to be any WYSIWYG editors, neither for you if you one day want
one, nor for a less technical user who you'll someday want to edit your
document.

So given almost zero knowledge about your problem, I'd recommend a WYSIWYG
html editor. Whichever one you choose, it'll occasionally screw up and corrupt
your formatting. Or maybe there will be subtle differences between the preview
layout and a final browser layout. If you think those kind of issues will be a
problem, then you REALLY don't want a lightweight markup language.

~~~
paulsmith
Right, it’s interesting that you wind up seeing these formats extended with
additional complexity, basically reimplementing HTML in their custom syntax,
for dealing with the publishing/processing pipeline.

I suggest an editor like vim or Emacs with HTML modes that give you auto-
indenting and tag completion key bindings. It’s really not that much more work
to author straight HTML, and if it’s what you’re targeting anyway, you’ll be
happier in the long run when you have to maintain it.

~~~
tptacek
No matter what your editor does, editing in HTML is simply slower than writing
a Markdown document. You may be overstating the complexity of things like
Markdown and Textile.

------
mbleigh
I prefer Textile because I find the linking syntax to be much more intuitive
(I can never remember what's in parens and what's in brackets in Markdown).

~~~
nex3
That's interesting, because I've heard that link syntax is one main reason
people prefer Markdown to Textile. One issue with Textile-style links is that
something like

    
    
      "Foo Bar":http://foo.com/bar.
    

is ambiguous, and the result depends on the parser. It could end up as

    
    
      <a href="http://foo.com/bar">Foo Bar</a>.
    

or it could end up as

    
    
      <a href="http://foo.com/bar.">Foo Bar</a>
    

The former is probably what you mean most of the time, but then there's no way
to link to the (valid!) URL "<http://foo.com/bar>.".

~~~
kgen
So it allows quoted strings on one side of the colon but not the other? Sounds
like a bug to me!

------
tdavis
Since they are so similar, I think it helps to answer a few simple questions:

1\. Do you need something that one has that the other doesn't?

2\. Who's your target audience? Are they going to be writing a lot of markup?
If so, considering the syntax differences is more important than say for blog
comments where the only likely uses are bold, italic, and link.

3\. How is the library support in your chosen language; are there any quirks?
I remember at one point a bug surfaced in py-textile that had something to do
with unicode chars so if you were using a lot of unicode chars it was better
to go with Markdown.

If I had to pick one I generally like more it would probably be textile, but
it's so dependent on the situation that I have no generalized evidence to
support one being superior as a rule. If you only want to deal with one,
period, I would probably go with Markdown just because, as mentioned, it is
more widely used and therefor (slightly) more well-known (also highly
dependent on audience) and likely to be better supported lib-wise.

------
sc
For general use, neither, but for personal use, Markdown. Unlike Textile, with
its specific syntax, Markdown adapts to various implementations of email
syntax (numbered lists actually use numbers, bulleted lists use hyphens or
asterisks). Write it like it would look in an email, and it should format
nicely.

------
jacobolus
Use Markdown. It works extremely well with TextMate, because all of TextMate’s
heaviest users and bundle contributors use Markdown. Once you start using it,
you certainly won't want to write any non-trivial text document in HTML ever
again.

------
tptacek
Different design goals.

Textile is more expressive. It has more features and does more stuff.

Markdown is more transparent. It's designed to capture the features of a text
email message and render them in HTML.

------
menloparkbum
Both of them will make you long for the days when you could have just typed in
some simple HTML tags.

~~~
dehowell
Umm, you can type regular HTML tags in a Markdown document. It parses just
fine.

------
jcromartie
I think Markdown is more widely used, but I personally like Textile because it
supports one thing that Markdown does not: footnotes. Otherwise, they are
basically equivalent to me.

~~~
willarson
Most up-to-date Markdown implementations support footnotes (specifically the
Python one does for certain, but the syntax has been around for a while).

The syntax is pretty easy. [^1]

[^1]: And really adds some jazz to blog entries.

------
galenking
I've put together a little survey to see what people prefer for markup. Check
it out: [http://luciddesign.co.nz/2009/2/9/textile-vs-markdown-vs-
tin...](http://luciddesign.co.nz/2009/2/9/textile-vs-markdown-vs-tinymce-etc)

------
nex3
I'm a fan of the default syntax offered by
[RedCloth](<http://whytheluckystiff.net/ruby/redcloth/>). It's Textile, but
with bits of Markdown thrown in, such as link syntax. It's only available for
Ruby, though.

------
chrisbroadfoot
I think it's fairer to compare Markdown + Smartypants to Textile.

That said, I still prefer Textile, I just like the syntax better.

------
knv
If you use RTL languages like Farsi, Hebrew, ... both of them are kinda
useless.

