Comparison

util/dataforms.lua @ 9111:bc7473fb7ad3

util.dataforms: Normalize indentation
author Kim Alvefur <zash@zash.se>
date Sat, 04 Aug 2018 23:12:41 +0200
parent 9094:05979ae1e38a
child 9121:e5eb36ee07a2
comparison
equal deleted inserted replaced
9110:3dbecb399dfb 9111:bc7473fb7ad3
111 -- Split into multiple <value> tags, one for each line 111 -- Split into multiple <value> tags, one for each line
112 for line in value:gmatch("([^\r\n]+)\r?\n*") do 112 for line in value:gmatch("([^\r\n]+)\r?\n*") do
113 form:tag("value"):text(line):up(); 113 form:tag("value"):text(line):up();
114 end 114 end
115 elseif field_type == "list-single" then 115 elseif field_type == "list-single" then
116 form:tag("value"):text(value):up(); 116 form:tag("value"):text(value):up();
117 elseif field_type == "list-multi" then 117 elseif field_type == "list-multi" then
118 for _, val in ipairs(value) do 118 for _, val in ipairs(value) do
119 form:tag("value"):text(val):up(); 119 form:tag("value"):text(val):up();
120 end 120 end
121 end 121 end
122 end 122 end
123 123
124 local media = field.media; 124 local media = field.media;