Lucas_Werkmeister_WMDE added a comment.
> In particular I'd -1 any code I saw using the “textual comment not supported” cop-out. For Wikibase, a more likely cop-out would be “added [en] label” – still using an interface message, but omitting the label value (the part that causes problems when parsed as wikitext). That way we don’t have to copy the “nasty regex” from `Linker::formatAutocomments` just to detect what exactly we need to escape. > In the end you're getting back to solving your other tasks with the invisible-character "escaping" anyway, so why not just use that as the solution? Because it’s not a full solution. Even leaving aside the autocomments and linking stuff, you already mentioned another problem on Gerrit <https://gerrit.wikimedia.org/r/c/mediawiki/core/+/490072#message-ec2f14a7a9250c0f28ee0fe076b22f81fc71d977>: > The main drawback is that it'll turn the "Created a claim" auto-comment into a bogus section link, rather than just displaying it in grey. I suppose you could do something with the 'FormatAutocomments' hook to avoid that if you really want. So we have to mess with the summary both before and after rendering it, and the rendering doesn’t even give us a lot of formatting options. > Particularly since not every use case actually wants HTML-formatted comments. Then why are we even using the `Message` class for comments? It already doesn’t have an output format that’s completely suitable for comment formatting (`->text()` is an approximation that doesn’t escape autocomments and links in supposedly plaintext params), and now you’re bringing up more output formats that can’t match any existing `Message` format at all, as far as I can tell (because everything except `plain` and `text` is geared towards HTML). TASK DETAIL https://phabricator.wikimedia.org/T218127 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: hoo, Aklapper, Lucas_Werkmeister_WMDE, Anomie, daniel, pdehaye, alaa_wmde, Michael, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, YULdigitalpreservation, LawExplorer, Salgo60, _jensen, rosalieper, MGChecker, abian, Wikidata-bugs, aude, Dinoguy1000, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
