Last modified: 2014-07-24 22:12:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65195, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63195 - Improve parser tests normalization.
Improve parser tests normalization.
Status: NEW
Product: Parsoid
Classification: Unclassified
tests (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 17:15 UTC by C. Scott Ananian
Modified: 2014-07-24 22:12 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description C. Scott Ananian 2014-03-27 17:15:41 UTC
We fail a number of tests due to different newlines around end tags.  For example, in the "Paragraphs with newline spacing with non-empty white-space lines in between" testcase, the expected output begins:

<hr />
<p>a
</p><p>b
</p>
<hr />

while Parsoid emits:

<hr/>
<p>a</p> 
<p>b</p><hr/>

We should (carefully) normalize trailing whitespace and inter-element whitespace (IEW) to make these tests pass (without obscuring real whitespace issues).

Bug 55588 is related, it deals with the IEW issue.  But there is also trailing whitespace to consider.

Simply normalizing \n</p> <-> </p>\n might be a good start.

You can see a lot of these issues by running parserTests.js --update-tests and then using git diff to see the changes made.
Comment 1 C. Scott Ananian 2014-03-27 17:46:00 UTC
See

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links