+ -- Keep track of the minimum indent level of all lines. Note that we don't
+ -- look at empty lines, of course.
+ indent = utf.len(utf.match(str, "^%s*"))
+ -- Find the lowest indent (but don't count empty lines)
+ if (not min_indent or indent < min_indent) then
+ min_indent = indent
+ end
+