Try adding them in a separate Text widget so you’ll have multiple text widgets to manage the code, rather than having everything inside the same one (easier to manage this way). When you create and stack multiple widgets, it should work fine since there will be separate div containers holding the content.