Page MenuHomePhabricator

"/* Section title */ (gadget name)" should not show a colon after the section link
Open, LowestPublic

Description

If you enter /* Section title */ (gadget name) as an edit summary, it renders as →‎Section title: (gadget name).

/* Section title */ renders as →‎Section title, without colon.

(gadget name) is a common way to indicate the gadget used to make an edit. (always useful for blame anyways)

When the first non-white space character is a (, the colon should be omitted.

Event Timeline

When the first non-white space character is a (, the colon should be omitted.

No. Why?

When the first non-white space character is a (, the colon should be omitted.

No. Why?

I don't know where you are from, perhaps where you live colons and parentheses are used differently? Parenthesis are used to enclose additional information, but are only acceptable when said information is not grammatically vital to the sentence. A colon draws attention to what follows and makes whatever follows grammatically non-optional. It's almost the exact opposite of what parentheses do. A colon shouldn't be followed by parentheses.

Granted there is a minor case where it's possible but still bad form: (if and only if) the text in parenthesis is followed by what the colon is supposed to emphasize. Still easy enough to catch: /^[ ]*\([^\)]*\)[ ]*$/ or something.

Am I a grammar Nazi?

I'd say that anyone is free to enter gadget name instead of (gadget name) to solve this "problem". Proposing to decline.

I'd say that anyone is free to enter gadget name instead of (gadget name) to solve this "problem". Proposing to decline.

That text is added by gadgets. How exactly is a gadget supposed to handle that? Omit the parenthesis when the user didn't enter a summary? No, that would make it look like the user entered the gadget name as a summary. Skip the gadget name if there is no summary? No, if something goes wrong you wouldn't know who to blame. Forcibly insert some summary, even if it's utterly useless (like "editing something"), just so the colon can make grammatical sense?

Aklapper triaged this task as Lowest priority.May 2 2022, 11:31 PM

I had no idea that text is added by gadgets. Thanks for the clarification!
Still proposing though to decline this corner case...

I had no idea that text is added by gadgets. Thanks for the clarification!
Still proposing though to decline this corner case...

It's quite common for gadgets: RedWarn, Shortdesc helper, XFDcloser, AFCH, ConvenientDiscussions, reply-link, CodeAjaxEditor, script-installer, BrandonXLF's Restorer and obviously my scripts, just to name a few. Not all of those can edit sections and I agree it would be a minor improvement, but an improvement nonetheless.

A suggestion was made to me to use square brackets instead of parentheses which I'm going to consider for my scripts (haven't decided yet, only just read it), this would be an improvement (though arguably omitting the section colon would look better in that case too) but this habit is too common to expect all script/gadget authors to switch anyway.