Module:GetSpanContent: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

8 January 2025

  • curprev 14:5414:54, 8 January 2025Mwroot talk contribs 843 bytes +843 Created page with "local p = {} function p.getSpanContent(frame) -- 获取页面的内容 local title = mw.title.getCurrentTitle() local content = title:getContent() if not content then return '<span style="color: orange;">无法获取页面内容,可能页面为空或不存在。</span>' end -- 从调用中获取 id 参数 local span_id = frame.args[1] or "xxx" -- 匹配指定 id 的 span 内容 local pattern = '<span%s+id="' .. span_id ....."