Local Yarn Code

"View Ticket"
2019-06-01
20:44 Closed ticket [713fa326]: Make footnote anchor links unique to each article plus 3 other changes artifact: 04dbe06c user: joel
20:43
[713fa32699] Make footnote links unique sitewide check-in: 62024c96 user: joel tags: trunk
2019-05-09
16:37 Ticket [713fa326] Make footnote anchor links unique to each article status still Open with 3 other changes artifact: bd95ae0b user: joel
2018-08-17
03:15 Ticket [713fa326]: 4 changes artifact: e30953ff user: joel
03:15 New ticket [713fa326]. artifact: f22197ef user: joel

Ticket UUID: 713fa32699d69e855adc037f1067143ac26281bd
Title: Make footnote anchor links unique to each article
Status: Closed Type: Feature Proposal
Severity: Important Priority: High
Subsystem: Resolution: Fixed
Last Modified: 2019-06-01 20:44:27
Version Found In:
User Comments:
joel added on 2018-08-17 03:15:11:

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 uri-encode from net/uri-codec is faster. Maybe use that on (remove-ext* here-path).

Here’s a quick way to get just a string out of a txexpr:

(define (tx-strs xpr)
  (cond
    [(txexpr? xpr) (apply string-append (map tx-strs (get-elements xpr)))]
    [(string? xpr) xpr]
    [else ""]))