HomePhabricator

ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names

Authored by matmarex on Oct 7 2019, 12:53 PM.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

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
(cherry picked from commit 55aec8f977d8133f5e20595ecf1db2b2f8d19835)

Details

Committed
matmarexOct 7 2019, 4:41 PM
ChangeId
I7c557d28e961d0b9117fc0380c65cdd42035ae96

Commit No Longer Exists

This commit no longer exists in the repository.