Page MenuHomePhabricator

Auto-Anchoring for text other than Headings
Open, LowestPublicFeature

Description

Author: david.sledge

Description:
One thing I like about the headings is that, if I have the following:

:<nowiki>==='''[[some page|Header Text]] More ''Text'''''===</nowiki>

MediaWiki is smart enough to strip out all the markup and hyperlinking from the text to create an anchor with the name "Header_Text_More_Text." If MediaWiki have a mechanic (outside of using headers) or extension for boiling markup down to just the resulting text? If not can anyone point to me where in the source code it does this so I can extract it and use in an extension?

I'd like to see an auto-anchoring mechanic for text other than headings. For instance, suppose I have a table:

{|

+ Sample Table
-

! table || header

-
tabledata
}

What I'd like to do is to anchor the caption text, like so:

{|

+ ""Sample Table""
-

! table || header

-
tabledata
}

I know I could easily use span tags, but (A) this method would be far more convenient, (B) it would emphasize the fact that one doesn't need to know HTML to markup an article, (C) although I could create an extension to do this, the core MediaWiki code would be able to keep track of anchors with potentially the same name.


Version: 1.21.x
Severity: enhancement

Details

Reference
bz10026

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10026.
bzimport added a subscriber: Unknown Object (MLST).

As nobody else has requested this and as a workaround is available (using span tags), I wonder if this should become a RESOLVED WORKSFORME or even WONTFIX.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:02 AM
Aklapper removed a subscriber: wikibugs-l-list.