markdown

What is the simplest implementation of Markdown for a Cocoa application?

I'm writing a Cocoa application in Objective-C, and I would like to be able to incorporate Markdown. The user will enter text in Markdown syntax, click an "export" button, and the program will output a file of XHTML. It seems like there are a lot of options, though. I could use one of the C/C++ implementations, I could run the Perl scri...

django & markdown issue: 'NoneType' object has no attribute 'strip'

I have a problem about markdown and django integration. After I installed markdown and change my model class to: class Page(models.Model): class Translation(multilingual.Translation): title = models.CharField(verbose_name="Title", max_length=30, help_text="Put a title (max. 30 chars) of your page -e.g. About, CEO, ...

javascript showdown, markdown not parsing correctly

I have a little confusing problem. I have two files, both that run showdown however it seems that only one file parses correctly. Here's the deal. File 1 . Is run through php and ajax File 2 . Is grabbed via an ajax request, the file the processes the ajax request contains this code. Here is the ajax as you can see, the jquery that...

How to zip a WordprocessingML folder into readable docx

I have been trying to write a simple Markdown -> docx parser/writer, but am completely stuck with the last part, which should be the easiest: i.e. compressing the folder into a .docx that Word, or any other .docx reader, will recognize. My parser-writer is irrelevant really: I have this problem if I simply unzip any old Word-produced...

Markdown And Escaping Javascript Line Breaks

I am writing a markdown compiler in Erlang for server-side use. Because it will need to work with clients I have decided to adopt the client side library (showdown.js) as the specification and then test my code for compatibility with that. In the first couple of iterations I built up 260-odd unit tests which checked that my programme pr...

What's a good syntax for an HTML link markdown to make internal links easier?

I want to create a good syntax for making it easier to link to internal things, kind of like a Wiki, so maybe I'm thinking the user can use something like: Bah bah bah reference: [[a]] And it would convert it into HTML: Bah bah bah reference: <a href="..../id=a">title</a> but I'm worry about interjection and security issues. What'...

How make a better markdown for developer blog

I'm rebuilding my blog at http://www.elmalabarista.com/blog/. I have use in my previous version markdown and now I remember why I have almost zero code samples. Doing code samples in markdown is very fragile. I try to put some python there I can't make markdown mark it as code!. The main culprit? The syntax is markdown for code is out s...

Is it the best practice to store content in the database as html when content is written in markdown?

Or is just saving markdown and rendering it on requests usually okay? I'm writing a site that uses markdown for content. Stack overflow similarly uses markdown for comments and questions. I'm storing the content as markdown in the database and then rendering it to html when the user visits the site. I've got a feeling I ought to be st...

Custom Markdown for PHP handling new lines

Hello World, I need custom Markdown library for PHP which converts new lines to <br/> without the need to put double space on the end of the line, kinda like here on SO. I've been looking on the web but without success. I know I could just amend standard library but my regex skills are none. Does anybody know about such library in exi...

Request for comments: What should the syntax be to include code snippets in Markdown? (from external files)

I've been using Markdown recently. One of my biggest problems with Markdown is that Markdown has no syntax for including files within a document (vs., say, the listings package for LaTeX). I'd like to extend Markdown to support including whole and partial files as code snippets. For instance, it could look like this: ![:include src/fo...

I seek parser markdown-file for presentation

hi, I search web-based markdown-file parser to presentation. I want to presentation from online markdown-file, realtime parse. Because I want to manege markdown-files on git repository like github. I try to parse on ruby script(gem) 'slideshow' or 'slidedown'. It is very useful but it need parsed before. I know javascript base present...

Computing article abstracts

I'm looking for a way to automatically produce an abstract, basically the first few sentances/paragraphs of a blog entry, to display in a list of articles (which are written in markdown). Currently, I'm doing something like this: def abstract(article, paras=3): return '\n'.join(article.split('\n')[0:paras]) to just grab the first...

Markdown and XSS

Ok, so I have been reading about markdown here on SO and elsewhere and the steps between user-input and the db are usually given as convert markdown to html sanitize html (w/whitelist) insert into database but to me it makes more sense to do the following: sanitize markdown (remove all tags - no exceptions) convert to html insert ...

Python Markdown: Markdown Inside HTML Blocks

Is there an extra for Python Markdown that supports Markdown inside HTML block elements, e.g. div, p i.e. is there a way to convert this: <div id="content"> [Google](http://www.google.com) </div> to <div id="content"> <a href="http://www.google.com&gt;Google&lt;/a&gt; </div> using Python Markdown or a Python Markdown exten...

Django templatetag for rendering a subset of html

I have some html (in this case created via TinyMCE) that I would like to add to a page. However, for security reason, I don't want to just print everything the user has entered. Does anyone know of a templatetag (a filter, preferably) that will allow only a safe subset of html to be rendered? I realize that markdown and others do this....

Is there a WIKI (preferably .NET) that uses Markdown as it's editor?

I am looking to set up an internal wiki for our development/design team. The key feature I am looking for is a very simple editor with revision history. Ideally, the uber-simple markup system StackOverflow.com uses (Markdown) would be great. One of the reasons for this is that we have non-technical people (managers, sales people, desi...

How do I make django's markdown filter transform a carriage return to <br />?

How can I change the default behavior in the markdown filter so that it transforms a newline to a br tag? ...

wmd markdown code problem

hi all i m using wmd markdown editor in my project and i have a problem with code tags: if i enter a code snippet , markdown does not convert to html correctly it converts in "<p>" tags but if i enter some text else first and then code snippet it converts correctly in "<code>" tags is this a bug of wmd markdown editor? and how can i solv...

markdown to HTML with customised WMD editor

For my application I customized slightly the way WMD behaves so when user enters empty lines, these are reflected in HTML output as <br />'s. Now I came to a point when I should store it somewhere at backend and so after going thru SO posts for a while I'm not sure what is the best way to do it. I have few options and if you could point ...

PHP Markdown \n Question

I'm using http://michelf.com/projects/php-markdown/ for my markdown library and my question is that if i edit and remove the \n\n functionality would this work Because the users that i have, are quite probably not allowed to run JavaScript therefore i cant count on the preview to be generated dynamically therefore they will make allot o...