Module:Scale tree: Difference between revisions
m Corrected variable name |
m Fixed comment code |
||
| Line 138: | Line 138: | ||
-- Check for comments | -- Check for comments | ||
local contains_custom_comment = comments[key] ~= nil | local contains_custom_comment = comments[key] ~= nil | ||
local contains_default_comment = default_comments[key] ~= nil | |||
local comment = "" | |||
if contains_default_comment and contains_custom_comment then | if contains_default_comment and contains_custom_comment then | ||
comment = comment .. default_comments[key] .. "<br>" .. comments[key] | comment = comment .. default_comments[key] .. "<br>" .. comments[key] | ||
| Line 145: | Line 147: | ||
comment = comment .. comments[key] | comment = comment .. comments[key] | ||
end | end | ||
result = result .. string.format("| %s\n", comment) | result = result .. string.format("| %s\n", comment) | ||