Page MenuHomePhabricator

[Suggestion] Check if image caption ends with "."
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
Sometimes image captions end with . while they should almost never do that. This may be worthy of an edit check.

Event Timeline

One approach would be to use the likely outcome of T422431, which intends to add the ability to scope a check to only apply within a given node type. In this case it'd be fairly easy to make a textmatch check that checks for \.$ only within mwCaption nodes.

Okay, given T422431's resolution, the following TextMatch rule works:

"caption-fullstop": {
	"query": "\\.$",
	"mode": "delete",
	"isRegExp": true,
	"title": "Caption full stop",
	"message": "Image captions shouldn't end with a full stop",
	"inNode": "mwImageCaption"
},

CleanShot 2026-07-10 at 09.43.04@2x.png (1,200×738 px, 378 KB)

(I edited that to actually have a delete, rather than just notifying.)