Last modified: 2013-12-03 22:52:39 UTC
1. Create a page with just <math>x=y</math> 2. API response is: [...] <body data-parsoid="{}"> <p data-parsoid='{"dsr":[0,16,0,0]}'> <img class="tex" alt="x=y" src="[...]" typeof="mw:Extension/math" data-mw='[...]' data-parsoid='[...]' about="#mwt3"> <span about="#mwt3" data-parsoid="{}">\n</span> </p> </body> The extra span causes the hover shield to render incorrectly. Interestingly the extra span doesn't appear when I use the Parsoid web service tester.
WFM. See snippet of json response from api.php extracted from google-chrome (for User:Ssastry/VE_Test) extracted from Chrome's console <p data-parsoid='{\"dsr\":[0,16,0,0]}'><img class=\"tex\" alt=\"x=y\" src=\"//upload.wikimedia.org/math/9/1/9/919860b52317a584e5de6f3257631d16.png\" typeof=\"mw:Extension/math\" data-mw='{\"name\":\"math\",\"attrs\":{},\"body\":{\"extsrc\":\"x=y\"}}' data-parsoid='{\"src\":\"<math>x=y</math>\",\"dsr\":[0,16]}' about=\"#mwt3\"></p>
Please reopen if still an issue.
See the same as you on live, but get a span wrapped line break on my local copy with up to date master.
Ed, can you test this on some other extension, say gallery, sourcehighlight, hiero, etc.? I dont have math installed locally and would like to avoid it if possible. But, if this is specific to <math>, I will bite the bullet.
http://parsoid-lb.eqiad.wikimedia.org/mediawikiwiki/User%3AGWicke%2FTest%2FMath?oldid=835467 looks ok to me as well. Trailing newlines returned by the math extension are encapsulated in spans to ensure round-tripping. The math extension however does not seem to return trailing newlines in this case.
Please reopen if we add newlines that aren't returned by the extension.