HomePhabricator

ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

Authored by matmarex on Oct 7 2019, 12:53 PM.

Description

ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

The ...target.wt property contains the wikitext used to generate
the template name. It can contain trailing newlines (T234817) and
all kinds of funny wikitext syntax. Instead, use ...target.href,
which is the title of the page that is actually transcluded. Compare
the new code to ve.dm.MWTransclusionNode.prototype.getPartsList.

Additionally, fix some confusion about namespaces (treating template
names as titles in the main namespace). The template names in the
configuration page (visualeditor-template-tools-definition.json)
now support overriding namespaces in the same way as in wikitext.

Bug: T234817
Change-Id: I7c557d28e961d0b9117fc0380c65cdd42035ae96

Details

Committed
matmarexOct 7 2019, 12:56 PM
Parents
rEVED052a879c3c6d: Update VE core submodule to master (8347ba91b)
Branches
Unknown
Tags
Unknown
ChangeId
I7c557d28e961d0b9117fc0380c65cdd42035ae96

Event Timeline