You can use non-capturing groups: (?:something|something else|etc). You need one and only one capturing group, but you can have as many non-capturing groups as you need.
If you are still having trouble, please provide some example Latex Code I can test with. I don’t use every language, so I always ask people provide me with example code, a clear explanation of what the they want BH to highlight, and their best attempting at creating the rules and/or scripts needed. This helps save me time.[/quote]
Yes, of course. Here is some code
[code]\begin{sidewaystable}
\caption{this is a sidewaytable}
\end{sidewaystable}
\begin{table}
\caption{this is a table}
\end{table}
\begin{figure}
\caption{figure}
\end{figure}[/code]
And my is modified entry in the brackets array in bh_core.sublime-settings.
{
"name": "latex_floats",
"open": "(\\begin\\{(?:table|sidewaystable|figure|sidewaysfigure|algorithm)\\})",
"close": "(\\end\\{(?:table|sidewaystable|figure|sidewaysfigure|algorithm)\\})",
// "open": "(\\begin\\{sidewaystable\\})",
// "close": "(\\end\\{sidewaystable\\})",
"style": "default",
"scope_exclude": "string", "comment"],
"language_filter": "whitelist",
"language_list": "LaTeX"],
"enabled": true
}
I would like to highlight
\begin{sidewaystable}…\end{sidewaystable}
\begin{table}…\end{table}
\begin{figure}…\end{figure}
But I only get the \end{..}
sourrounded with a black line and a ? indicating that ST is unable to find the opening bracket. Any idea why?
Thanks!