-- Push dedented lines of start tag onto output and return true;
-- otherwise return false because:
-- * props include a multiline string (or text node, if props have markup)
-- * start tag does not close

function dedentStartTag(input: Array<string>, output: Array<string>): boolean
	local line = input[#output + 1]
	table.insert(output, dedentLine(line))

	if string.find(line, ">") then
		return true
	end

	while #output < #input do
		line = input[#output + 1]

		if hasUnmatchedDoubleQuoteMarks(line) then
			return false -- because props include a multiline string
		elseif isFirstLineOfTag(line) then
			-- Recursion only if props have markup.
			if not dedentMarkup(input, output) then
				return false
			end
		else
			table.insert(output, dedentLine(line))

			if string.find(line, ">") then
				return true
			end
		end
	end

	return false
end
