Parsoid makes parse requests to the MediaWiki API for extensions where
it doesn't have a native implementation. The php parser sometimes
returns trailing newlines which wouldn't be present from the extension
if it were being unstripped inline, since it tacks these on at eof.
From https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/469355/