「模組:Vertical」:各本之異
[底本] | [底本] |
刪去的內容 新增的內容
細 Lua不能用{{Vtext|...}}乎? 不好…… |
細 能用矣! |
||
第八行:
local function convert_line(s)
-- {{VH2|...}}
header = s:match("===%s*(.+)%s*===s*")
if header ~= nil then
第一三行 ⟶ 第一四行:
end
-- {{VH1|...}}
header = s:match("==%s*(.+)%s*==s*")
if header ~= nil then
第一八行 ⟶ 第二〇行:
end
-- 有人欲用單乎?
list_item = s:match("\*%s+(.+)%s*")
if list_item ~= nil then
return '<div style="width:1.5em; float:right; cursor: vertical-text;">• ' .. s .. ' </div>'
end
-- {{Vtext|...}}
return '<div style="width:1.5em; float:right; cursor: vertical-text;">' .. s .. ' </div>'
end
第二八行 ⟶ 第三七行:
r[#r + 1] = convert_line(v)
end
r[#r + 1] = '<br clear="all" />'
return table.concat(r, "\n")
|