Page MenuHomePhabricator

API: extracts with explaintext doesn't put a newline after lists.
Open, LowPublic

Description

Take a look at the API response for https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Wikipedia:Selected_anniversaries/October_27&explaintext

{
    "batchcomplete": "",
    "warnings": {
        "extracts": {
            "*": "\"exlimit\" was too large for a whole article extracts request, lowered to 1."
        }
    },
    "query": {
        "normalized": [
            {
                "from": "Wikipedia:Selected_anniversaries/October_27",
                "to": "Wikipedia:Selected anniversaries/October 27"
            }
        ],
        "pages": {
            "492913": {
                "pageid": 492913,
                "ns": 4,
                "title": "Wikipedia:Selected anniversaries/October 27",
                "extract": "October 27\n\n1838 \u2013 Governor Lilburn Boggs issued Missouri Executive Order 44, ordering all Mormons to leave the state or be killed.\n1914 \u2013 World War I: The Royal Navy dreadnought HMS Audacious was sunk by a mine, but its loss was kept secret for four years.\n1946 \u2013 Inter-religious riots, in which Hindu mobs targeted Muslim families, began in the Indian state of Bihar, resulting in anywhere between 2,000 and 30,000 deaths.\n1958 \u2013 General Ayub Khan (pictured) deposed Iskander Mirza to become the second President of Pakistan.\n2004 \u2013 The Boston Red Sox completed a sweep of the St. Louis Cardinals to win the World Series, breaking the so-called \"Curse of the Bambino\".Mary Sidney (b. 1561) \u00b7  Robert Hubert (d. 1666) \u00b7  Judy LaMarsh (d. 1980)"
            }
        }
    }
}

The relevant part here is breaking the so-called \"Curse of the Bambino\".(HERE)Mary Sidney (b. 1561) \u00b7 Robert Hubert (d. 1666) \u00b7 Judy LaMarsh (d. 1980)".
There is no newline at the end of the list of events, making it incredible hard to parse this information for bots.

Event Timeline

nixx created this task.Oct 27 2018, 2:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 27 2018, 2:37 PM
Jdlrobson triaged this task as Low priority.
Jdlrobson added a subscriber: Jdlrobson.

We are not actively working on this feature but well tested patches are welcome. We recommend using the REST base API if possible.