Page MenuHomePhabricator

De overload {{nop}} at Wikisource, by implementing appropriate back end support or magic words, to provide hints to back-end.
Closed, DeclinedPublic

Description

Currently, in a number of instances there is a need to use a template called {{nop}}, at English Wikisource to force a paragraph and other types of break in the content, which is then later tidied up by the parser. Currently on English Wikisource {{nop}} is implemented as a template rather than a "magic-word".

However the current usage of this template is overloaded, as it's used not only for it's original function of marking a nominal paragraph break, it's also used as a 'table-continuation' at the start of page content.

The overloaded use of {{nop}} is not ideal, and the current inability of Mediawiki and some extensions to cleanly handle the situation of a 'continued' element (Such as table/list/div etc) is a concern.

It would be appreciated if there was at some point appropriate changes made so that:-

  • {{nop}} becomes a magic word, and is de-overloaded so it returns to it's original purpose of marking a paragraph break only.
  • There was some kind of page_property which the parser, renderer, extension(s) could use, to explicitly know there was a clear structural break between pages (and or sections), and amend the parsing/rendering behaviour accordingly, without needing to rely on the (non) presence of a specific template or templates
  • There was an implementation of other "render-hint" magic words, to control the behaviour of the parser/render output so that issues like a continued table or list elements can be addressed in a less obscure way than at present. (The thinking would be for something like this)
...
|-
|lorem ipsum||1984||678
{{!tflow-next}}
<page discontinuity>
{{!tflow-prev}}
|-
|lorem||1985||901
...

Which would provide the hinting, ( As an aside putting the {{tflow-prev}} on it's own line could have a side-effect like the current overloaded use of {{nop}}, but ideally for things like templates it would be nice to have it so that a specfic line-feed/whitespace character wasn't explicitly required.)

# Item 1.
# Item 2.
# Item 3.
# Item 4. which is continued...{{!lflow-next}}
<page discontinuity>
{{!lflow-prev}}... on to the next page.
# Item 5.

To give 2 examples in respect of uses cases I've come across. However, figuring out where to "close up" elements in the output and under what circumstances might be tricky.

  • In summary, it would be nice to have mediawiki markup extended so that it CAN be used more cleanly with content built from "multiple" page and Labelled sections, which is encountered a lot on Wikisource, but rarely on more popular wikis like Wikipedia...

Event Timeline

ShakespeareFan00 updated the task description. (Show Details)

I find it difficult to believe that enWS's use of {{nop}} is the issue here, it is a nothing template, I would think that there are other templates in use that are problematic. You should be looking at the html commentsof "NewPP limit report" in a main ns page to identify the issues and the pages.

I don't see any particular issue with LST as this is more a transclusion issue, and not so much to do with sections.

There is an issue with transcluding pages with partial parts of tables (as the open and close components can be inside <noinclude> sections) and how mediawiki can input a <p> inside a table due to how the sections are seen.

If we have a particular issue with template expansion with the use of tables, then that may be the methodology in how we build templates. The forthcoming ability to do template styles will give us the ability to explore how we can do things in a different way, though whether it will suitably manage or affect the template expansion matter I am yet to see.

There was also a concern that {{nop}} which generates a

<p></p>

Might generate warnings about "Fostered" content unnecessarily, despite it being on obvious special case.

ShakespeareFan00 lowered the priority of this task from Medium to Lowest.

Marking as declined, No consensus emerged.