Commit graph

7 commits

Author SHA1 Message Date
Ed Sanders 1b5550f485 Move var declarations inline
Mostly ve-mw/ui and a few left overs.

Change-Id: Idea0c94d974e661c49af8ad4545cd8fd98179ca8
2022-03-01 17:50:24 +00:00
Thiemo Kreuz c2017f74b2 Remove @param/@return docs that literally repeat the code
These don't add any knowledge but make the code harder to read
and maintain, and are an additional source of errors.

Change-Id: Ied57741a3f985e355adfddb4e75378d5c497faa9
2021-06-14 15:44:51 +02:00
Bartosz Dziewoński 1af7c4da6a Fix typo in doc comment
Change-Id: I47d189564928dfd056d83e27b2ee6db23a98a83e
2021-01-21 00:15:13 +01:00
Ed Sanders 85a856e016 MWDefinedTransclusionContextItem: Add param getter
Change-Id: I7fdd4810118e72b9719b840fa5e0887006a74a25
2020-12-14 14:29:06 +00:00
Ed Sanders de47496b19 Move MWutils to preinit and rename to parsoid utils
Bring in ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref
and ve.resolveUrl, so that the file has no dependencies on VE.

Change-Id: I03bc455d5484a6c51f3fa2397c64936b829fe7e3
2020-03-24 23:13:16 +01:00
Bartosz Dziewoński 55aec8f977 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
2019-10-07 14:56:16 +02:00
Ed Sanders e5f5a49344 Support for defined template context items
Context items can be created for specific template titles. Titles
are mapped to context items using an on-wiki message.

Bug: T211243
Change-Id: Icfc39e350452da238d0e0c17cb2305c60d9ca16a
2019-08-30 13:02:47 +01:00