The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 10: | Line 10: | ||
return "Article content not available" | return "Article content not available" | ||
end | end | ||
-- Remove comments and some special formatting | -- Remove comments and some special formatting | ||
Line 26: | Line 20: | ||
content = content:gsub("==", "") -- Remove level 2 headers | content = content:gsub("==", "") -- Remove level 2 headers | ||
content = content:gsub("=", "") -- Remove level 1 headers headers | content = content:gsub("=", "") -- Remove level 1 headers headers | ||
-- Replace HTML entities | |||
content = mw.text.unstrip(content) | |||
content = mw.text.decode(content) | |||
-- Count the words | -- Count the words |