Perhaps this is a specific task, but I’ll ask you anyway. Is it possible to track the first use of shortcode and correct the behavior based on this attribute.
I have a shortcode that, in a simplified way, inserts such a construction , but at the first insert it is not logical to insert a closing tag, and at the last insert it is not logical to insert an opening tag.
Is it possible to somehow get in the shortcode itself what kind of shortcode it is?