Skip to content

Commit 217a75e

Browse files
committed
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.
1 parent b7e58f4 commit 217a75e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

templates/relnotes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Version {{version}} ({{date}})
22
==========================
33

4+
<a id="{{version}}-Language"></a>
5+
46
Language
57
--------
68
**relnotes**
@@ -9,6 +11,8 @@ Language
911
**other**
1012
{{language_unsorted}}
1113

14+
<a id="{{version}}-Compiler"></a>
15+
1216
Compiler
1317
--------
1418
**relnotes**
@@ -17,6 +21,8 @@ Compiler
1721
**other**
1822
{{compiler_unsorted}}
1923

24+
<a id="{{version}}-Libraries"></a>
25+
2026
Libraries
2127
---------
2228
**relnotes**
@@ -25,9 +31,13 @@ Libraries
2531
**other**
2632
{{libraries_unsorted}}
2733

34+
<a id="{{version}}-Stabilized-APIs"></a>
35+
2836
Stabilized APIs
2937
---------------
3038

39+
<a id="{{version}}-Cargo"></a>
40+
3141
Cargo
3242
-----
3343
**relnotes**
@@ -36,9 +46,13 @@ Cargo
3646
**other**
3747
{{cargo_unsorted}}
3848

49+
<a id="{{version}}-Misc"></a>
50+
3951
Misc
4052
----
4153

54+
<a id="{{version}}-Compatibility-Notes"></a>
55+
4256
Compatibility Notes
4357
-------------------
4458
**relnotes**
@@ -47,6 +61,8 @@ Compatibility Notes
4761
**other**
4862
{{compat_unsorted}}
4963

64+
<a id="{{version}}-Internal-Changes"></a>
65+
5066
Internal Changes
5167
----------------
5268

0 commit comments

Comments
 (0)