Generates unnecessary closing html tag

In HTML, if I paste a code block that already has the opening and closing tag, it automatically generates a closing tag for the first opening tag

For example

<section>
 ...
</section>

Becomes

<section></section>
 ...
</section>

Could it be the extension? I don’t have this problem.