Wikipedia:Bots/Requests for approval/PrimeBOT 49
From Wikipedia, the free encyclopedia
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was
Approved.
PrimeBOT 49
Operator: Primefac (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 11:28, Friday, May 22, 2026 (UTC)
Function overview: Replace hard-coded double-space sentencing
Automatic, Supervised, or Manual: Automatic
Source code available: WP:AWB
Links to relevant discussions (where appropriate): MOS:DOUBLESPACE, Discussion, Request
Edit period(s): OTR
Estimated number of pages affected: ~2200
Namespace(s): Article
Exclusion compliant (Yes/No): Yes
Function details: Replace all instances of: (a punctuation) followed by (a hard-coded non-breaking space) followed by (a space) (or vice versa), e.g. . Whatever → . Whatever. Based on the BRFA it sounds like this will primarily handle full stops and commas followed by the nbsp but there might be other punctuation that needs to be dealt with as well (I suspect mainly " and ').
Discussion
It looks like this is common in page numbers in references, such as p. 19, and I suspect in tables sometimes? Are we sure these are always a bad idea? — xaosflux Talk 15:27, 2 June 2026 (UTC)
- There is a difference between
p. 19andp. 19; the latter is what this run is meant to eliminate. Of course, if you mean "the replacement should use nbsp and not a space" for linebreak purposes etc, then I would agree with you, and I can add in a positive lookbehind for that sort of thing. Primefac (talk) 20:09, 2 June 2026 (UTC)
Approved for trial (50 edits or 30 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — xaosflux Talk 14:44, 3 June 2026 (UTC)
Trial complete. Edits. Two things of note, I did add (after this edit) the ability for No.andVol.to keep the nbsp (the former seen in later edits). There are also the inevitable context issues, of which I only saw Special:Diff/1357660354 where it should keep the nbsp but there's legitimately no way for AWB to know that. That being said, it's not wrong to have a space instead of an nbsp there, it just means it might linebreak. Primefac (talk) 22:38, 3 June 2026 (UTC)- I went over all 50 edits and did not notice any errors. There are some cases where an intelligent editor would make better corrections, but that is out of scope, and the important thing is that even these edits are still improvements (like in the mentioned
D. incisivecase, where "it might linebreak" was equally true before the edit). Do we need to wait 30 days before continuing? — Mikhail Ryazanov (talk) 05:23, 13 June 2026 (UTC)- No, just need a BAG to make a judgement. Primefac (talk) 11:28, 13 June 2026 (UTC)
- OK. One obvious thing that I've missed in the original request: in addition to
, we actually also have ~1800 pages with (NBSP after a regular space) at least after commas and periods. This usage is actually worse because it would render a visible space at the beginning of a new line if a line break occurs (perhaps this is why I did not expect and did not check such usage). Would it make sense to add such cases to this request and retest/reapprove? Or to wait until this task is done, then submit a new request? — Mikhail Ryazanov (talk) 21:57, 13 June 2026 (UTC)- It's literally just flipping the order of the search, so I don't see any reason why it would unduly delay things, but if a BAG member feels it requires an extended trial to show it works, I can do that. Good catch though. Primefac (talk) 00:27, 14 June 2026 (UTC)
Approved. The trial edits look good. I don't really see an issue with the "NBSP after a regular space" change either, so it should be good to go. Please update the BRFA details accordingly. – DreamRimmer ■ 05:45, 14 June 2026 (UTC)
- It's literally just flipping the order of the search, so I don't see any reason why it would unduly delay things, but if a BAG member feels it requires an extended trial to show it works, I can do that. Good catch though. Primefac (talk) 00:27, 14 June 2026 (UTC)
- OK. One obvious thing that I've missed in the original request: in addition to
- No, just need a BAG to make a judgement. Primefac (talk) 11:28, 13 June 2026 (UTC)
- I went over all 50 edits and did not notice any errors. There are some cases where an intelligent editor would make better corrections, but that is out of scope, and the important thing is that even these edits are still improvements (like in the mentioned
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.