If condition displays the last row for false result

Hi Team,

In my template there is table with single column and in that there is a if condition with false result.
In generated document rows are getting deleted because of false result but it shows last row as is.
I have attached the template and I am using the aspose.words 24.10 version.

if_condition_issue.docx (14.3 KB)

@dwagh Since the if tag takes up the entire line, its effect extends to lines above the closing tag and therefore lines containing the text "Test" are not deleted. If you need to delete these lines, you can specify the -greedy switch in the closing tags. And if you need to delete the text "Test", but leave the line, you need to use an additional if tag. If you need to leave the text "Test", you can also move the closing tags to the lines above and use the -greedy switch.