From 217a75ee174afe30b9612afa8f18fdc1370f1ba5 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 3 Nov 2022 12:52:47 -0400 Subject: [PATCH] Add version-stable anchors to the release notes template. The current template embeds anchors from subheadings like "Compiler" that have the same section subheading name; thus, the generated html ends up with `id` attributes that have been uniquified (by adding a incremented suffix, e.g. `#compiler-2`) but those `id` attributes will change (e.g. to `#compiler-3`) as new releases come out. The change in this PR enables one to write urls that end with e.g. `#1.66.0-Compiler` and have that url remain usable (in terms of pointing to the compiler subsection *for that release*), even in face of future releases. FYI: in my local experimentation, it appears that in the context of hackmd, visiting an anchor tag with no contents will end up scrolling to a point where the hackmd toolbar obscures the subsection heading. This is unfortunate (though still an improvement on the current state of affairs where one has *no option* to link directly to these subsections in a version-stable manner). I am hoping that there is not a similar problem for the RELEASES.md file when viewed on github itself. --- templates/relnotes.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/templates/relnotes.md b/templates/relnotes.md index a7b9d78..b608db6 100644 --- a/templates/relnotes.md +++ b/templates/relnotes.md @@ -1,6 +1,8 @@ Version {{version}} ({{date}}) ========================== + + Language -------- **relnotes** @@ -9,6 +11,8 @@ Language **other** {{language_unsorted}} + + Compiler -------- **relnotes** @@ -17,6 +21,8 @@ Compiler **other** {{compiler_unsorted}} + + Libraries --------- **relnotes** @@ -25,9 +31,13 @@ Libraries **other** {{libraries_unsorted}} + + Stabilized APIs --------------- + + Cargo ----- **relnotes** @@ -36,9 +46,13 @@ Cargo **other** {{cargo_unsorted}} + + Misc ---- + + Compatibility Notes ------------------- **relnotes** @@ -47,6 +61,8 @@ Compatibility Notes **other** {{compat_unsorted}} + + Internal Changes ----------------