Page MenuHomePhabricator

Content from Page: namespace on wikisource not appended at SOL
Closed, ResolvedPublic

Description

For example, the broken render at,

https://es.wikisource.org/api/rest_v1/page/html/P%C3%A1gina%3AFiguras_i_descripciones_de_aves_chilenas.djvu%2F44

is because the source Parsoid receives looks like,

<noinclude><pagequality level="3" user="Ninovolador" />{{c|28}}
{|style="font-size:90%;margin:0 auto;" width=70%
| || {{menor|Pulg.}} || {{menor|lín.}}
|-</noinclude>|Lonjitud del dedo mediano ||—|| 10½
|-

Where |Lonjitud del dedo mediano ||—|| 10½ should be preceded by a newline.

This was noted at, https://www.mediawiki.org/wiki/Topic:U4yizxwac6fnqzch

Related Objects

Event Timeline

Arlolra triaged this task as Medium priority.Jan 2 2018, 11:07 PM

Change 401816 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/extensions/ProofreadPage@master] Preserve SOL context when serializing page content as wikitext

https://gerrit.wikimedia.org/r/401816

Change 401816 abandoned by Arlolra:
Preserve SOL context when serializing page content as wikitext

https://gerrit.wikimedia.org/r/401816

I'd like to note that adding a newline between any pages will break other things. Eg. when an image is added on a separate page inside a paragraph:

  • page1: start of paragraph text
  • page2: image (as a <div>)
  • page3: end of paragraph text

If a newline is inserted between pages, parser will end the paragraph before the image, inserting an extra </p> there and the actual paragraph becomes split. This is not an expected behaviour.

If a newline needs to be added between pages, then this should be context dependent.

I would think that we would add the comment that this is known for about 10 years and English wikisources have been managing this using placeholders like
https://en.wikisource.org/wiki/Template:Nopt

which contains
<onlyinclude><!-- {{nop}} action for a table --></onlyinclude>

It is just a necessary evil and one of the compromises we have managed.

Jgiannelos claimed this task.