I am hiding text in my marketing cloud email based on if the subscriber is in CO. Now the code below works and I can fire off a preview and test that it's working. The issue is when I save the block, update existing, or just save the email my closing [end if] jumps up to right after the opening if statement. So when I go back into test the script no longer hides anything because it's not wrapped around the content any longer.
%%[IF TRIM([state]) == 'CO' OR SUBSTRING(TRIM([postal_code]),1,2) == '80' OR SUBSTRING(TRIM([postal_code]),1,2) == '81' THEN]%%
<tr>
<td align="center" class="m-padding-leftright-20px" style="font-size:0px;padding:10px 40px;word-break:break-word;">
<div style="font-family:semplicitapro, rial, sans-serif;font-size:14px;line-height:20px;text-align:center;color:#ffffff;">
Text I am turning off based on location
</div>
</td>
</tr>
%%[ENDIF]%%
This is how it looks after it's saved and I leave to go into another email
%%[IF TRIM([state]) == 'CO' OR SUBSTRING(TRIM([postal_code]),1,2) == '80' OR SUBSTRING(TRIM([postal_code]),1,2) == '81' THEN]%% %%[ENDIF]%%
<tr>
<td align="center" class="m-padding-leftright-20px" style="font-size:0px;padding:10px 40px;word-break:break-word;">
<div style="font-family:semplicitapro, rial, sans-serif;font-size:14px;line-height:20px;text-align:center;color:#ffffff;">
Text I am turning off based on location
</div>
</td>
</tr>