Problems with incorporating markdown into a project

Ryan Booker ryanbooker at gmail.com
Sun May 8 08:11:52 EDT 2005


You might be right.  But I don't think storing two versions is a good
solution.  That's roughly double the data for each post.

My reason is this:

To keep the syntax of the post common rather than a blend of markdown
and html (which is likely) I wanted to store the post as either 100%
markdown text or 100% html.  That means it has to be processed either
way before insert.  I decided that storing it as html was better as it
means I can just blat it to screen without processing it.  I figured a
million people accessing a live page would be more of a processing
performance hit than a few people accessing the CMS sections.

It turns out the problem was with magic quotes.  :)



On 5/8/05, Lou Quillio <public at quillio.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Isn't this too complex, though?
> 
> Back when TextPattern was in alpha, I remember asking Dean why he
> was storing two representations of each post:  a raw version
> (marked-up with Textile) and a transformed XHTML version.  The
> reason was performance, that is, the raw input would be stored for
> future editing, be transformed upon save, and the transformed data
> presented at display time.
> 
> But he agreed that wasn't perfectly elegant (ya gotta love the guy's
> instincts), and had a solution planned:  de-Textile, a parser that
> would convert XHTML blobs to Textile pseudomarkup.  That way, only
> an XHTML version would be stored.
> 
> I thought it was nuts.  I still think it's nuts.  Don't think
> de-Textile ever happened.
> 
> Why not store the data as Markdown, transform it at display time,
> and be done?  It's not expensive.  That's what I have Drupal doing
> (at TextDrive) and it performs just fine.
> 
> With all this transforming and de-transforming, something's bound to
> go wrong.  I just don't see the advantage.  If there were one, it'd
> be performance, and that seems easier to address by storing two
> representations.
> 
> LQ
> 
> 
> Ryan Booker wrote:
> | I'm using Markdown in my personal CMS project.  Locally on my Mac (OSX
> | Tiger) I have html2text, Markdown and SmartyPants both running without
> | any problems.
> |
> | When I make a post I run it through Markdown.pl then SmartyPants.pl
> | then save it in the db.
> |
> | When I edit a post I run it through html2text.py (by aaron swartz) so
> | that the html is stripped and replaced by markdown syntax.
> |
> | This works perfectly on the mac.
> |
> | As soon as I upload this to my Textdrive account, it no longer works.
> | Markdown refuses to correctly convert referenced links to html.
> | Though all other markdown syntax continues to work.  The referenced
> | links are left as markdown syntax rather than being converted to html.
> |  Inline links work fine.
> |
> | Any ideas?
> |
> | Cheers,
> | Ryan
> | _______________________________________________
> | Markdown-Discuss mailing list
> | Markdown-Discuss at six.pairlist.net
> | http://six.pairlist.net/mailman/listinfo/markdown-discuss
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCff92Wb6NuB4EK7oRAk92AJ9ZwybA7zw5/5sbjVrmKvybsj8glQCdH1i1
> CCpU10dGEQn58NB38kmt4m0=
> =/373
> -----END PGP SIGNATURE-----
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>


More information about the Markdown-Discuss mailing list