Page MenuHomePhabricator

Allow formatting empty autocomments in edit summaries
Open, Needs TriagePublic

Description

Edit summaries may have so-called "autocomments", which is the part of the summary between /* ... */ markers, usually containing a section title and formatted as a link to that section when displaying the diffs or edit history.

In English-language wikis it has been a common convention (created by a gadget) to use the autocomment /* top */ to create a link to the lead section of the page. This generates a link such as #top, which has special meaning in HTML (when a section by that name doesn't exist); this doesn't work if you were to translate the word "top" to another language.

As a prerequisite for T2156, we should make it so that the empty autocomment /* */ will also create a link to the top of the page, with a localisable label. This is currently not recognized as an autocomment by the code and not formatted, and it is not possible to link to a section with an empty heading, so there is no conflict with existing syntax. I think an empty autocomment is a fairly intuitive way to refer to the only section that by definition has no title.

Event Timeline

Change #1217733 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Allow formatting empty autocomments in edit summaries

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

Change #1217733 merged by jenkins-bot:

[mediawiki/core@master] Allow formatting empty autocomments in edit summaries

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