Page MenuHomePhabricator

Explaintext formatting missing out some paragraph breaks
Closed, DuplicatePublic

Description

Has there been a change to how explaintext=1 is processed on an API call? It looks like it's not putting a line feed "\n" (or any spacing at all) at the ends of paragraphs which end with a ref tag.

For example, the first three paragraphs on the Wikipedia "Human" article return as follows (when queried as https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=Human&exsentences=10&explaintext=1&exlimit=1):

"...more complex brains and societies.Early hominin..."
"...populated most of the world.The spread of humans..."
"...other technologies and arts.\nHumans are uniquely adept..."

The correct formatting would be for an "\n" to appear after every full stop, every time a paragraph ends in the article.

Looking at the original article, the first two paragraphs end with ref tags and the third does not. Testing this on other articles with a mix of ref and non-ref paragraph ends, I see the same result.

I've been using the API and explaintext for at least a year, and only noticed this starting to happen a couple of months ago. It definitely wasn't doing it before.