Module:Glossary: Difference between revisions
Content deleted Content added
Created page with "-- Module:AutoGlossary local p = {} function p.generate(frame) local current = mw.title.getCurrentTitle() local content = current:getContent() or "" -- find all internal links local seen = {} local entries = {} for link in content:gmatch("%[%[([^%]|]+)") do local title = link:match("^(.-)#") or link title = mw.text.trim(title) if not seen[title] then seen[title] = true local p..." |
No edit summary |
||
Line 16:
if not seen[title] then
seen[title] = true
-- look up the Definition: namespace version
local defTitle = "Definition:" .. title
if page and page.exists then
local text = page:getContent() or ""
-- strip templates,
text = text:gsub("%b{}", "")
text = text:gsub("^%s+", "")
local sentence = text:match("^(.-%.)")
▲ local count = 0
table.insert(entries, {
title = title,
summary =
})
end
| |||