mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
MWCategoryMetaItem: Allow trailing whitespace (e.g. \n) in category names
Encountered on a page with [[d:Template:Translation_categories]]. Change-Id: Ib2df3518e3047d32626a156c32d5ef9e37ea9b3a
This commit is contained in:
parent
7f5da34de8
commit
8539f75b54
|
@ -36,7 +36,7 @@ ve.dm.MWCategoryMetaItem.static.toDataElement = function ( domElements ) {
|
|||
var href = domElements[ 0 ].getAttribute( 'href' ),
|
||||
data = mw.libs.ve.parseParsoidResourceName( href ),
|
||||
rawTitleAndFragment = data.rawTitle.match( /^(.*?)(?:#(.*))?$/ ),
|
||||
titleAndFragment = data.title.match( /^(.*?)(?:#(.*))?$/ );
|
||||
titleAndFragment = data.title.match( /^(.*?)(?:#(.*))?\s*$/ );
|
||||
return {
|
||||
type: this.name,
|
||||
attributes: {
|
||||
|
|
Loading…
Reference in a new issue