mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Include fragments in normalizedTitle"
This commit is contained in:
commit
84f7d9f3b0
|
@ -104,7 +104,11 @@ ve.dm.MWInternalLinkAnnotation.static.getHref = function ( dataElement ) {
|
|||
*/
|
||||
ve.dm.MWInternalLinkAnnotation.static.normalizeTitle = function ( original ) {
|
||||
var title = mw.Title.newFromText( original );
|
||||
return title ? title.getPrefixedText() : original;
|
||||
if ( title ) {
|
||||
return title.getPrefixedText() + ( title.getFragment() !== null ? '#' + title.getFragment() : '' );
|
||||
} else {
|
||||
return original;
|
||||
}
|
||||
};
|
||||
|
||||
/* Methods */
|
||||
|
|
Loading…
Reference in a new issue