Autocomment

Autocomments are fragments of the edit summary (which is commonly referenced within the codebase as "comment") inside C-style comment markers. For example, the edit summary  contains two autocomments,   and. Autocomments are mainly used for specifying which section was edited; the default comment formatter behavior turns the autocomment into a link to the section with the same name.

The hook can be used to customize autocomment handling; some extensions use it to generate multilingual comments by putting the i18n message key and parameters in an autocomment. For example, adding a sitelink to French Wikipedia on Wikidata would result in an edit summary of  which the hook would replace with the output of.

External tools which want to display edit summaries the same way they are displayed in MediaWiki can use the  property of the various revision-related APIs.