Volatile:ListField

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
<!----List fields of name "<nowiki>{{{1|}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>".---->{{#lua:
 
<!----List fields of name "<nowiki>{{{1|}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>".---->{{#lua:
 +
  function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end
 
   list = {}
 
   list = {}
 
   id = {}
 
   id = {}
   for page,data in stdin:gmatch("&&([%S]+)&&{{{1}}}= *([^\n]+) *") do
+
   for page,data in stdin:gmatch("&&([%S]+)&&{{{1}}}= *([^\n]+)") do
 
     if ((data ~= "-") and (data ~= " ")) then
 
     if ((data ~= "-") and (data ~= " ")) then
       data = string.trim(data)
+
       data = trim(data)
 
       tmp = list[data]
 
       tmp = list[data]
 
       if (tmp == nil) then
 
       if (tmp == nil) then

Revision as of 01:12, 9 February 2010

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox