What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

How are the comment fields on Stack Exchange sites converted from text to HTML?

I'm looking into doing something similar (not for comments, but for writing small lists with bold and italic text). Is the text here parsed? Is there some regex that looks for text like "**bold**" and converts the double stars to open/close <strong> tags?

I'm also looking at parsing (Textile in particular). Just wondering what the some of the options are.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

It's called Markdown. If you download the WMD editor (either the main version or SO's fork), you'll find a file showdown.js that does the Markdown-to-HTML conversion. (There are server-side libraries for it too, of course.)

WMD is mainly the editor for questions and answers, not comments, but SO is using a subset of the Markdown syntax available in questions and answers for comments now too.

share|improve this answer
    
typo, I was actually looking for the editor conversion. (: –  peirix Jul 8 '09 at 8:31
    
is there an api for this that I can use to write my own word processor, in say... java? –  Ephraim Apr 20 '12 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .