Overview
Artifact ID: | f22197ef4fddcf22ad870e7c6709ba043c6b93333c77cd530b4bef4d21b46fe9 |
---|---|
Ticket: | 713fa32699d69e855adc037f1067143ac26281bd
Make footnote anchor links unique to each article |
User & Date: | joel on 2018-08-17 03:15:11 |
Changes
- icomment:
Footnote anchor link IDs should have a prefix that is deterministic/unique to the article in which it appears, so that in full-body listings of multiple articles the IDs do not collide. Since the metas of the current article are now visible to tag functions, perhaps the prefix should default to some encoding of ‘here-path’, or if that is not present, some hash of the first string contained in the first element of the document. MD5 hashes look cooler, but some light testing shows that <code>uri-encode</code> from <code>net/uri-codec</code> is faster. Maybe use that on <code>(remove-ext* here-path)</code>. Here’s a quick way to get just a string out of a txexpr: <pre><code>(define (tx-strs xpr) (cond [(txexpr? xpr) (apply string-append (map tx-strs (get-elements xpr)))] [(string? xpr) xpr] [else ""]))</code></pre>
- login: "joel"
- mimetype: "text/x-fossil-wiki"
- severity changed to: "Important"
- status changed to: "Open"
- title changed to: "Make footnote anchor links unique to each article"
- type changed to: "Feature Proposal"