Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Request: Headings and footnotes act as link anchors
Inspired by the change log but certainly not limited to that one post.
Many times I find myself writing an answer which goes on for quite a bit, and I find it natural to break it up with # Headers
. Sometimes I find that what I wrote on question A contains material which is helpful for question B as well. If it's a sufficiently long answer, it might be helpful to link not to the answer itself, but rather to the specific section of the answer.
Proposal: Can headers double as link anchors, so that linking to, for instance, /a/12345#1
links to the first heading, /a/12345#2
links to the second heading, /a/12345/1#1
links to the first subheading under the first heading, etc.? (Or at least just top-level headings?) Maybe similar for footnotes, where linking to /a/12345#f1
links to the first footnote?
2 answers
Using numbers as references to the Nth heading is a bad idea. When a heading gets added or deleted, all the links out there will be wrong.
If this is going to happen at all, it makes more sense to use the existing id="name" attributes on heading tags. That's already a well-defined standard.
0 comment threads
Fancy Heading
This is technically already possible using HTML: just add an id
attribute to your header tags:
<h1 id="fancy-heading">Fancy Heading</h1>
Going to /questions/123456#fancy-heading
will now send you straight to that heading - even if it's in an answer.
Given that this is already possible and adding it to the Markdown renderer isn't that easy, we'll leave it as-is for now, but we may be able to revisit once we've hit MVP.
1 comment thread