Open dsavchenko opened 3 years ago
Hi, can you give a few examples? It is not clear to me what the problem is.
Consider following latex
\caption{The beginning $a=b_{22}$ and the rest of text}
Resultant plain text will be '$ and the rest of text' instead of either remove or include all the caption.
So the task is to match the outermost bracket of environment, skipping inner uses of them.
Unfortunately, this is not something that can be easily done with a regex. Also, I'm not much of a regex expert.
If the text in \caption{ } (other environments as well, but appears in captions frequently) contains the closing bracket "}", it is matched instead of the outer one, leading to the subsequent part of the text going to the textarea. BTW, what is the reason behind skipping captions?