Module:DYK queue formatting check
Appearance
| This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. |
| This module depends on the following other modules: |
This module automatically checks for stylistic and formatting errors unique to DYK.
Usage
{{Did you know/Clear/header}}- Transcluded by pages like Template:Did you know/Queue/1 and Template:Did you know/Preparation area 1
{{#invoke:DYK queue formatting check|main}}- Manually for sandboxes
-- Verifies [[WP:DYKMOS]]
-- https://en.wikipedia.org/wiki/Wikipedia:Main_Page/Errors#c-Ravenpuff-20250321152600-Current_DYK
local p = {}
function p._check(content)
if string.find(content, "|''[^]]+''%]") then
return "WP:DYKMOS: Markup should go on the outside of the link if possible"
end
if string.find(content, "%(''[^)]+''%)") then
return "WP:DYKMOS: Note that the italics sit outside the parentheses"
end
if (string.find(content, "''s")
or string.find(content, "[^']'''{{'s}}")
or string.find(content, "''''{{`s}}")) then
return "WP:DYKMOS: Keep the bold text and the apostrophe distinct"
end
end
function p.main(frame)
local message = p._check(mw.title.getCurrentTitle().content)
if message then
return require("Module:Error").error{message}
end
end
return p