Module:Chapter displaytitle

From A Wiki of Ice and Fire
Revision as of 14:09, 18 August 2026 by Abjiklam (talk | contribs) (Created page with "local p = {} function p.display() local title = mw.title.getCurrentTitle().text local book, chapter = title:match("^(.*)-Chapter (%d+)$") if not book then...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Documentation for this module may be created at Module:Chapter displaytitle/doc

local p = {}

function p.display()
    local title = mw.title.getCurrentTitle().text

    local book, chapter = title:match("^(.*)-Chapter (%d+)$")

    if not book then
        return title
    end

    return "''" .. book .. "''-Chapter " .. chapter
end

return p