Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:DropList
(view source)
Revision as of 06:59, 17 October 2015
19 bytes added
,
9 years ago
m
no edit summary
Line 24:
Line 24:
local args_grammar = {
local args_grammar = {
−
to_trim
= '^%s*(
.-
)%s*$',
+
node
= '^%s*(
%a
)%s*$',
comma_list = '[^,]+',
comma_list = '[^,]+',
ship_and_nodes = '^%s*(.-)%s*:%s*(.-)%s*$',
ship_and_nodes = '^%s*(.-)%s*:%s*(.-)%s*$',
Line 51:
Line 51:
-- header args
-- header args
for node in string.gmatch(args.nodes, args_grammar.comma_list) do
for node in string.gmatch(args.nodes, args_grammar.comma_list) do
−
local node = node:match(args_grammar.
to_trim
)
+
local node = node:match(args_grammar.
node
)
−
table.insert(tbl.nodes, { name = node, boss = node == args.boss })
+
if node then
+
table.insert(tbl.nodes, { name = node, boss = node == args.boss })
+
end
end
end
がか
cssedit, gkautomate
7,064
edits