Changes

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