correctly parse markup within markup