Fix whitespace trimming in headings
authorSubramanya Sastry <ssastry@wikimedia.org>
Wed, 21 Mar 2018 01:01:55 +0000 (20:01 -0500)
committerSubramanya Sastry <ssastry@wikimedia.org>
Fri, 23 Mar 2018 16:42:01 +0000 (11:42 -0500)
commit87c7ccd9bcada35f5645e727f1524f69d0345c23
tree78c1fbcfcd9d90b1be2736096e36f14b45b3ce0f
parent7fd4b2b446d77f063fcde07f88216fd19381f264
Fix whitespace trimming in headings

b3dd3881 was trimming whitespace in wikitext as well as HTML headings
  whereas the whitespace-trimming proposal was going to leave HTML tags
  untouched.

30495ea1 missed this because coincidentally, the test I added there
  for HTML headings had a typo and used <h2>...<h2> instead of
  <h2>...</h2> which caused the test to magically pass.

* This patch trims whitespace in
  doHeadings (which deals with wikitext headings) instead of
  formatHeadings (which deals with all headings).

* Updated parser tests to account for this.

Change-Id: I854f20b4c39a0a8e03d70155b269de77acf02cae
includes/parser/Parser.php
tests/parser/parserTests.txt