HomePhabricator

Bug 67657: Add normalized parameter names to templates

Authored by marcoil.

Description

Bug 67657: Add normalized parameter names to templates

If the original parameter name had wikitext making it different
from the normalized name, a new attribute key.wt will contain the
original parameter name wikitext.

Add a new parameter to Util.tokensToString to also strip empty
line meta tokens.

New tests:

  • Templates: Handle comments in parameter names (bug 67657). Blacklisted for html2wt as it's not possible to get the correct whitespace without data-parsoid, for now.
  • Templates: Other wikitext in parameter names (bug 67657). Blacklisted for all cases but wt2wt, as the internal Parsoid template expander incorrectly reduces wikitext like ''1'' to a valid parameter name 1.

Change-Id: I466243013955df1990cdf93469bef8be9c80f96e