Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Notifications
Mark all as read
Q&A

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

+7
−0

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?

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (3 comments)

2 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+5
−0

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.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+5
−0

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.

Click this!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (2 comments)

Sign up to answer this question »