markdown

Are there any tools to convert Markdown documents to HTML en masse?

I'm writing some documentation in Markdown, and creating a separate file for each section of the doc. I would like to be able to convert all the files to HTML in one go, but I can't find anyone else who has tried the same thing. I'm on a Mac, so I would think a simple bash script should be able to handle it, but I've never done anythin...

Markdown vs markup - are they related?

I'm using markdown to edit this question right now. In some wikis I used wiki markup. Are they the same thing? Are they related? Please explain. If I want to implement one or the other in a web project (like stackoverflow) what do I need to use? ...

A WYSIWYG Markdown control for Windows Forms?

[We have a Windows Forms database front-end application that, among other things, can be used as a CMS; clients create the structure, fill it, and then use a ASP.NET WebForms-based site to present the results to publicly on the Web. For added flexibility, they are sometimes forced to input actual HTML markup right into a text field, whic...

Markdown versus ReStructuredText

What are people's thoughts on the pros and cons of Markdown versus ReStructuredText. Both seem like very usable and well-developed markup languages -- when might one want to use one over the other? ...

How can I get markdown to format this code properly ?

Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code: #define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, format, ##__VA_ARGS__); \ } \ else { \ ...

How do you get double-underscores to display in markdown?

In python, there are some special variables and filenames that are surrounded by double-underscores. For example, there is the __file__ variable. I am only able to get them to show up correctly inside of a code block. What do I need to enter to get double underscores in regular text without having them interpreted as an emphasis? ...

HTML to Markdown with Java

is there an easy way to transform HTML into markdown with JAVA? I am currently using the Java MarkdownJ library to transform markdown to html. import com.petebevin.markdown.MarkdownProcessor; ... public static String getHTML(String markdown) { MarkdownProcessor markdown_processor = new MarkdownProcessor(); return markdown_proce...

Processing Javascript RegEx submatches

I am trying to write some JavaScript RegEx to replace user inputed tags with real html tags, so [b] will become <b> and so forth. the RegEx i am using looks like so var exptags = /\[(b|u|i|s|center|code){1}]((.){1,}?)\[\/(\1){1}]/ig; with the following JavaScript s.replace(exptags,"<$1>$2</$1>"); this works fine for single nested t...

Regular expression to convert mark down to HTML

How would you write a regular expression to convert mark down into HTML? For example, you would type in the following: This would be *italicized* text and this would be **bold** text This would then need to be converted to: This would be <em>italicized</em> text and this would be <strong>bold</strong> text Very similar to the mark...

How do you store the markdown using WMD in asp.net?

I have implemented the WMD control that StackOverflow uses into a project of mine, it almost works like a charm ... but ... when I save the changes to the database it is saving the HTML version and not the markdown version. So where I have this in my text box: **boldtext** It is really saving this: <b>boldtext</b> Any ideas how ...

Saving contents of the WMD Editor Control

I'm trying to implement the WMD editor used on StackOverflow to create some basic Wiki-style functionality. I'm up to the point where it's time to save to the database, but I'm unsure as to what I should be saving. If I save the produced HTML then I can retrieve and display it correctly, but on re-edit I'm faced with editing HTML, not ...

Is there any good Markdown Javascript library or control?

I want to build a site where the user can enter text and format it in Markdown. The reason I'd like a Javascript solution is because I want to display a live preview, just like on StackOverflow. My site is not targeted at developers, however, so an editor control would be ideal. I gather that on StackOverflow, the WMD editor is being u...

Vim Markdown highlighting (list items and code block conflicts)

I decide to learn more about vim and its syntax highlighting. Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too. My issue is between list items and code block highlighting. Code Block definition: first line is blank second line begins with at least 4 spaces or 1 t...

How would you go about auto-detecting Textile versus Markdown?

I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a JavaScript and a PHP solution so I can provide live previews as well as process the u...

Bookmarklet link in Markdown document

How can I include a bookmarklet in a Markdown parsed document? Is there any "tag" for markdown that basically says "don't parse this"?? For example you could have something like: <a href="javascript:function my_bookmarklet() {alert('Hello World');} my_bookmarklet();">Hello</a> But if I try to past the ...

How do I get python-markdown to additionally "urlify" links when formatting plain text?

Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs when I format a block of text? ...

Convert HTML back to Markdown for editing in wmd

I am curious to do what happens when you edit a post on this site. I am using wmd for my markdown editor, of course when I goto edit, I get the HTML it generated not the markdown like on stackoverflow. Now, is there a way I can store both? or is it reliable enough to simply convert the HTML back to markdown to show in the wmd editor? ...

How to validate Markdown?

It's possible to write Markdown content with invalid syntax. Invalid means that the BlueCloth library fails to parse the content and throws an exception. The markdown helper in Rails doesn't catch any BlueCloth exceptions and because of that the complete page fails to render (500 Server Error page is rendered instead). In my case, users...

Design Pattern to apply conversion to multiple properties in multiple classes

I am using the WMD markdown editor in a project for a large number of fields that correspond to a large number of properties in a large number of Entity classes. Some classes may have multiple properties that require the markdown. I am storing the markdown itself since this makes it easier to edit the fields later. However, I need to co...

Markdown and image alignment

I'm helping out a friend with a non-profit site that publishes articles in issues each month. They are mostly straightforward, and I think using a markdown editor (like the wmd one here in SO) would be perfect. However, they do need the ability to have images right-aligned in a given paragraph. I can't see any way to do that with the cur...