The following LaTeX code block is incorrectly highlighted after the commented section:
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
\documentclass[11pt]{article}
\begin{document}
Commands occur in a number of forms and are preceded or delimited by these special characters: \verb2\ # $ & ~ _ ^ % { } < >2. A~backslash immediately before most of these characters escapes (or suppresses) their special meanings, but it does not escape \verb2\ ~ <2 or \verb2>2.
% notice the highlighted text in TeXstudio from this point. this appears to be a bug.
The backslash often denotes the beginning of a command whose name follows the character. \verb2\<name>2 is the simplest named command form where \verb2<name>2 is a replaceable string.
\end{document}</name></name>
TeXstudio 2.11.2 (hg 6191:c01fb289a5fe)
Using Qt Version 5.7.1, compiled with Qt 5.6.1 R
Host OS:
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
usually \verb| ... | or \verb+ ... + is used and that is supported. Some more charcters are supported as well. Why "2" needs to used, I don't know. Just use another delimiter-character.
I you really need this, you can adapt the language definition:
languagesin you settings directorycontext id="verb$i"and add<e>2</e>to the loop elements.See also the user manual
Note: When chosing to use your own language definition, any future updates we may provide in the built-in language definition will not be visible for you.