Merge "Include fragments in normalizedTitle"

This commit is contained in:
jenkins-bot 2014-02-12 18:32:08 +00:00 committed by Gerrit Code Review
commit 84f7d9f3b0

View file

@ -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 */