Line 20: |
Line 20: |
| local table_footer = '|}' | | local table_footer = '|}' |
| | | |
− | local table_row = [=[|- id="${label}" class="qA" | + | local table_row = [=[|- id="${label}" class="q${letter}" |
| |rowspan="2"|'''${label}''' | | |rowspan="2"|'''${label}''' |
| |colspan="11"|'''<span lang="ja">${title}</span>'''<br>''${title_en}'' | | |colspan="11"|'''<span lang="ja">${title}</span>'''<br>''${title_en}'' |
− | |- class="qdA" | + | |- class="qd${letter}" |
| |${detail_en} | | |${detail_en} |
| | | | | |
Line 32: |
Line 32: |
| |${note}]=] | | |${note}]=] |
| | | |
− | local function render(args) | + | local function render(args, frame) |
| local category = args.explicit[1] | | local category = args.explicit[1] |
| local data = Data.load('Quest', category) | | local data = Data.load('Quest', category) |
Line 38: |
Line 38: |
| table.insert(result, table_header) | | table.insert(result, table_header) |
| for i, q in ipairs(data) do | | for i, q in ipairs(data) do |
| + | q.letter = q.label:sub(1, 1) |
| table.insert(result, _.format(table_row, q)) | | table.insert(result, _.format(table_row, q)) |
| --[[ | | --[[ |
Line 55: |
Line 56: |
| end | | end |
| table.insert(result, table_footer) | | table.insert(result, table_footer) |
− | return _.join(result, '\n') | + | return frame:preprocess(_.join(result, '\n')) |
| end | | end |
| | | |
| return View(render) | | return View(render) |