When normalising a TemplateData blob for API consumers, we previously
automatically generated the 'paramOrder' with the order of the keys
as they were specified in the JSON blob (which, unlike in JS, is
known to be reliable in PHP).
While this was useful to some extent, it made it mandatory for
Parsoid and VisualEditor to always re-order properties during
edits to match the specified order.
In order to allow the order to remain flexible/unspecified, the
original Specification made paramOrder optional, but during the
implementation I gave it a default, which kind of defeated that
intention. This patch fixes that.
Bug: T138200
Change-Id: Ib40d23dac7e75274083f95a25c5aa1c22dfffb22
Three-braces-and-a-bang can be a table starting construct in templates.
This also fixes an overlooked bug in which the test wasn't checking
array element key names.
Bug: T157029
Change-Id: I69ed4fc9fe3bb126b7b39abea0f58ad56adf3885
This allows them to wrap over multiple lines if necessary, greatly
improving the result for templates with ridiculous number of aliases,
like <https://en.wikipedia.org/wiki/Template:Cite_book/TemplateData>.
Change-Id: I5826ac31b83e81f89f85e87f9098570b3759ccfb
One more, after my comment in I997bc0f8c7d99f73c1cc6b4ce46f6bcdc1eee410
got happily ignored.
Bug: T190581
Change-Id: I26dc9018693ffd4c5edcda021c8adce52325cdc9
Parameter names can be constructed with parser functions, so
we should not include these as raw parameter names. There
might be more characters to add here.
Bug: T203605
Change-Id: If57a9ed7edf1e881cd121d9a1bcb2e7455c04ec9
When extracting raw parameters from wikitext, ignore those that
only differ from already-found ones by spaces, underscores, or
hyphens.
Bug: T193265
Change-Id: I012e06bf4353eaaf0613124d7d6b88f3444d248a
Deprecate the 'doNotIgnoreMissingTitles' parameter and
replace it with 'includeMissingTitles'. If this parameter
is requested 'raw parameters' will be added to the
response in the same format as templatedata parameters.
Raw parameters are those that *might* be in the
template (using the same logic as the TemplateData generator
wizard).
Also fix the example that was using a falsy value which
meant the option was enabled rather than disabled as it
says in the docs.
Bug: T191756
Change-Id: Ie5fe2097cda45968bb080643d3afcac0b2868a6c