markdown

Add a custom format in Rails (that will work with respond_to)

I have map.resources :posts and I want to be able to serve post bodies in markdown format. So I set up my respond_to block: respond_to do |format| format.markdown { render :text => @post.body.to_s } end But when I try to access /posts/1234.markdown, I get this error: NameError (uninitialized constant Mime::MARKDOWN): app/co...

Using sphinx with Markdown instead of RST

I hate RST but love sphinx. Is there a way that sphinx reads markdown instead of reStructuredText? ...

Generate markdown from source code doc-comments

Is there any easy way to generate markdown from source code comments? I'm looking for something similar to Sandcastle, but with Markdown (or something like it) as output. The full story is that I use DokuWiki to generate documentation. It has many nice properties, including that all its data is stored in text files. So my idea is that I...

Is there a Markdown editor for Dojo

Is there a good Markdown editor for Dojo? I have seen Control.TextArea (based on Prototype) and Stack Overflow's reverse-engineered version of WMD (seems to rely on jQuery) but I'd rather use a Dojo-based tool, as my site already uses this framework. Does such a tool exist? Googling for dojo markdown editor doesn't seem to return any u...

Markdown to plain text in Ruby?

I'm currently using BlueCloth to process Markdown in Ruby and show it as HTML, but in one location I need it as plain text (without some of the Markdown). Is there a way to achieve that? Is there a markdown-to-plain-text method? Is there an html-to-plain-text method that I could feel the result of BlueCloth? ...

PHP code to convert text blocks indented by four spaces into a <pre><code> block [Markdown]

Hi, I'm not very good at PHP and would like to have a PHP function which turns this (text block indented by four spaces): printf("goodbye world!"); /* his suicide note was in C */ Into this: <pre><code> printf("goodbye world!"); /* his suicide note was in C */<...

JQuery/JS Markdown plugin?

I'm writing a chat app, and I'd like to add some simple functionality where users use markup to affect text formatting, like bold or italics. I'm envisioning this would be like how it is done on Google Talk or StackOverflow. Does JQuery have any plugins to do this? ...

PHP Markdown Extra and Definition Lists

I'm currently generating a definition list with PHP Markdown Extra with the following syntax: Term : Description : Description Two My Other Term : Description which generates the following HTML: <dl> <dt>Term</dt> <dd>Description</dd> <dd>Description Two</dd> <dt>My Other Term</dt> <dd>Description</dd> </dl...

Is there javascript to convert HTML to markdown?

There is showdown.js to convert markdown to HTML, and PHP Markdown to convert markdown to and from HTML. My question is, is there javascript library to convert HTML to markdown? ...

Vim: wrap text ("gq") without modifying underlined headings

Is there a way of formatting text in Vim that respects underlined headings? In Markdown, there are two ways of representing headings: #Level 1 heading ##Level 2 heading ###Level 3 heading and for level 1 & 2 only: Level 1 heading =============== Level 2 heading --------------- I am fond of the underlining style, as I think it rea...

rails & markdown error: uncaught exception: Control.TextArea requires Object.Event to be loaded.

So, I've got bluecloth installed and I'm trying to use the Control.TextArea javascript WYSIWYG editor. Anyways, I followed the tutorial on the page and when I load the corresponding view, I get an error: uncaught exception: Control.TextArea requires Object.Event to be loaded. This comes from Control.TextArea js file. Any ideas? Tha...

Embed javascript in markdown

I'm using the Maruku markdown processor. I'd like this *blah* blah "blah" in [markdown](blah) <script src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; <script> ...do stuff... </script> but it complains when I render it with a multitude of errors. The first one being _______________________________________________...

Correct sequence of actions when using Markdown & MySQL?

I want my users to be able to write an article in Markdown, have it stored in the MySQL database (with the option to edit it in the future), and displayed for other users. In practice, this is my understanding of how it works: INPUT user input via HTML form using Markdown syntax $queryInput = mysql_real_escape_string($userInput); ins...

Markdown implementation in PHP parses text within <a> tags — how does one disable this behavior?

I'm using the Markdown library for PHP by Michel Fortin. I started noticing that it formats the text in tags with markdown rules, like so: http://foo.com/My_Url_With_Underscores essentially becomes: <a href="...">http://foo.com/My&lt;em&gt;Url&lt;/em&gt;With_Underscores&lt;/a&gt; How do I disable that behavior or otherwise prevent...

Parallel scroll textarea and webpage with jquery

This is both a conceptual and how-to question: In wiki formatting, or non WYSIWYG editor scenarios, you typically have a textarea for content entry and then an ancillary preview pane to show results, just like StackOverflow. This works fairly well, except with larger amounts of text, such as full page wikis, etc. I have a concept that ...

Markdown: Why are there numerous implementations of the "Markdown" markup language?

I was recently looking for a personal wiki and come upon Hatta, which uses Markdown simplify to editing and generate html. My question is why are there some many implementations of Markdown in Python, Javascript, PHP, etc. when an official Perl implementation already exists? Is there some benefit to having this choice? ...

Symfony MarkDown File

Hi there! Sorry the basic doubt but is there any recommended way to open a file using symfony? I'm trying to open a MarkDown source file. Thanks for the help, Best regards! ...

Symfony MarkDown

Hi there! I'm trying to add some MarkDown capabilities to my symfony project (symfony version 1.3.3). To accomplish that, I had already included the MarkDown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library. However, I'm getting a fatal PHP error: Call to undefined func...

How to link to part of the same document in Markdown?

I am writing a large Markdown document and would like to place a table of contents of sorts at the beginning that will provide links to various locations in the document. How can I do this? I tried using [a link](# MyTitle) where MyTitle is a title within the document and this didn't work. ...

Markdown to text/plain and text/html for multipart email

I’m looking for a solution to send DRY multipart emails in Rails. With DRY I mean that the content for the mail is only defined once. I’ve thought about some possible solutions but haven’t found any existing implementations. The solutions I’ve thought about are: load the text from I18n and apply Markdown for the html mail and apply M...