Footnotes
Mark Henderson Linton
marklinton at mac.com
Thu Jul 28 13:17:24 EDT 2005
On Jul 28, 2005, at 12:02 PM, John Gruber wrote:
> Michel Fortin <michel.fortin at michelf.com> wrote on 07/27/05 at
> 12:59 pm:
>
>> It still need a little more thought, especially about id attributes
>> which should not clash with anything else on the same page. Often,
>> there is more than one weblog entry on a page.
>>
>
> Right; that's why we can't use IDs like "fn1", "fn2" -- you could
> have two posts on the same page, both with footnotes, and they'll
> need unique IDs.
>
> We could veer the other way and generate IDs using some sort of hash
> (MD5 or whatever), or some other GUID algorithm. But such IDs ought
> to be stable -- meaning that if you run the same input twice, you
> should get the same unique IDs both times. The other thing is that
> you ought to get the same IDs for yur footnotes if you edit an
> existing post.
How about something like the way Gracenote identifies CDs. Generate a
CRC from the entire input stream (or other appropriate hash) and then
use that as a root for the ID and a one-up counter to make them
unique within the snippet. That way, the same input would generate
the same IDs. They would be likely, though not guaranteed, to be
unique and so could be used on index pages that aggregated multiple
markdown snippets. They would be ugly (md74698764_001), but workable.
Sincerely,
Mark Linton
--
Research is what I'm doing when I don't know what I'm doing. --
Wernher von Braun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://six.pairlist.net/pipermail/markdown-discuss/attachments/20050728/431fabb1/attachment.html
More information about the Markdown-Discuss
mailing list