Page MenuHomePhabricator

New line after {{DISPLAYTITLE:}} should be ignored
Open, MediumPublic


Typical article using {{DISPLAYTITLE:}} has that function on the first line, then line wrap and then infobox or start of the text.

Currently that creates empty paragraph on output -> the article content starts further down from headline than regular articles do.

Version: 1.18.x
Severity: normal


TitleReferenceAuthorSource BranchDest Branch
Draft: [BREAKING CHANGE] Use new createZObjectKey.repos/abstract-wiki/wikifunctions/function-orchestrator!200apineapine-no-stable-stringifymain
d/changelog: bump to 16.0.13repos/cloud/toolforge/jobs-cli!51dcarobump_to_16.0.13main
Update function-schemata sub-module to HEAD (eb689ce)repos/abstract-wiki/wikifunctions/wikilambda-cli!43jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (eb689ce)repos/abstract-wiki/wikifunctions/function-evaluator!231jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (eb689ce)repos/abstract-wiki/wikifunctions/function-orchestrator!198jforrestersync-function-schematamain
cli: get the toolname from the k8s certrepos/cloud/toolforge/jobs-cli!49dcaroallow_running_inside_buildservicemain
definitions: Add Z1931/trw ZNaturalLanguagerepos/abstract-wiki/wikifunctions/function-schemata!132jforresterfix-Z189-keymain
definitions: Add Z1931/trw ZNaturalLanguagerepos/abstract-wiki/wikifunctions/function-schemata!131jforresterlanguage-trwmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:11 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz34957.
bzimport added a subscriber: Unknown Object (MLST).

I'm pretty sure that if we changed this we would see a lot of complaints as soon as it was deployed.

I'm pretty sure that it was working that way before update to weaken restrictions.

You should definitely change the behaviour to *not* add blank lines.

I've seen many articles on Wikipedia with ugly excessive vertical space after page title due to this error. Common templates (e.g. even work around this issue by including the {{DISPLAYTITLE:}} template in a <span></span>.

I can't think of any case were newlines at the beginning of the page are actually needed so I can't imagine you'll break anything or receive any complaints.

Code update regression can't be marked as enhancement. Changing.

I think it would be good to revisit this a bit, maybe see if things have changed in the last 9 years.

I've hit this on and investigated. Turns out that the behavior is still present in some wikis, but not in You can use the following minimal test case:

Lorem ipsum

On there is a visible empty line, while on there isn't.

Screenshot_20210227-001706.jpg (2×1 px, 282 KB)
Screenshot_20210227-001635.jpg (2×1 px, 303 KB)

The worse is that you mileage might vary even on the same site. Compare the code above with

{{Infocaseta Monument}}
Lorem ipsum

The second snippet does not generate an empty line on either project.