Links in DF's Markdown?

Owen Densmore owen at backspaces.net
Wed Jul 18 18:24:26 EDT 2012


I noticed the markdown used for
http://daringfireball.net/projects/markdown/had this:

Discussion List <a id="discussion-list" />

---------------

It seems to be a way to associate id's or classes with markdown elements.
Is this a standard "best practices"?

I've gone a different direction in my use of MD. I have a trivial jQuery
stunt that looks for class=markdown, and uses the id-name + ".md", to
identify a file. So if my page HTML has:

<body>
<div id="body" class="markdown"> </div>
<div id="footer" class="markdown"> </div>
</body>

.. the jQuery function inserts body.md and footer.md, translated to HTML
via js-markdown-extra.js (on GitHub), into the innerHTML of the divs.

Here's an example: http://backspaces.net/temp/mdtest/mdtest.html If you
View Source, you'll see the jQuery conversions.

I rather like avoiding a "compile" step so use the MD as the page source,
with js-markdown-extra doing the conversion. It also lets the class=foo &
id=foo be outside of markup stunts.

I hope this is not too noob! .. but if best practices include including
HTML like the <a> above, I'd like to understand it a bit better.

-- Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20120718/3f2bdccc/attachment.htm>


More information about the Markdown-Discuss mailing list