Page MenuHomePhabricator

Flow comments start and end with a lot of whitespace
Closed, ResolvedPublic


After T175937 was resolved, I was hoping that posts could be extracted with something as simple as

$( 'article' ).map( function( i, e ) {
	return $( e ).text();
} );

When I tried this, I noticed that many Flow posts start with "\n\t\t\t\t\t\t" (a line break and six tabs) and ends with "\n\t\t\t\t\t" (a line break and five tabs). Some posts start with "\n\t\t" and end with "\n\t". There does not seem to be – as far as I'm able to discern – any pattern to this, i.e. it does not seem to be related to indentation of the post.

Is this intentional? Where does it come from?

Example page:

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nirmos triaged this task as Lowest priority.Mar 4 2018, 4:12 AM

There's a bunch of whitespace in the <article> tags before and after. We can probably remove that.

Change 458789 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Flow@master] Trim whitespace around Flow posts

Change 458789 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Trim whitespace around Flow posts

Etonkovidova closed this task as Resolved.EditedSep 14 2018, 10:51 PM
Etonkovidova added a subscriber: Etonkovidova.

Checked the fix in betalabs - e.g.:

Screen Shot 2018-09-14 at 3.50.20 PM.png (275×1 px, 69 KB)

Compare with testwiki (wmf.20):

Screen Shot 2018-09-14 at 3.49.50 PM.png (301×1 px, 93 KB)