Page MenuHomePhabricator

Action API response field for showing "partially parsed" comments (for autocomments)
Open, Needs TriagePublicFeature

Description

Some extensions use autocomments to show machine-generated comments in the reader's language (instead of hard-coding it in page history in the language of the editor who made the comment); typically the raw comment would look something like /* wbsetsitelink-add:1|frwiki */, and then the FormatAutocomments hook replaces it with the localized text. This results in a poor experience in tools which show the raw comment (such as NavPopups). This can be worked around by using the parsed comment (eg. the parsedcomment response field instead of comment for API modules like revision or compare), but for tools which for some reason don't wan't to deal with HTML, it would be nice if the "half-parsed" comment, ie. the raw wikitext with the FormatAutocomments hook applied on it, would also be exposed.

In practice this would more or less mean calling CommentParser::doSectionLinks() on the raw comment.