# Auto Pair Markdown syntax in Latex Block

Under certain circumstances auto pair Markdown syntax functions inappropriately inside latex blocks. I can verify it happens under the specific case of using ‘\vec{}’, but it may happen under other circumstances.

Type: $\vec{v}_ ### Expected result Auto pair Markdown syntax does not work inside a latex block. ### Actual result Auto pair Markdown syntax adds a second underscore. ### Environment • Operating system: Ubuntu 20.04 • Obsidian version: 0.9.7 ### Additional information I first noticed this problem in 0.9.6 and it may not have existed in 0.7.x, since I’ve been using latex for vectors quite a bit with previous versions and only noticed the bug after skipping several versions. The problem also occurs if you are completely inside a$ $pair (as opposed to typing straight through) or if you use$\$.

Just wanted to add, sometimes Obsidian seems ‘confused’ about whether it is in a latex block or not (highlights things as if it isn’t), but I don’t have any useful information about why/when this occurs right now, though it may be related.

open a feature request