highlighted text gets added to nested containers