The problem was simply you have to escape backslashes in regex but also escape backslashes in the JSON settings strings as well, which can cause slightly unintuitive escapeing:
So you want this:
\\begin\{(?:table|sidewaystable|figure|sidewaysfigure|algorithm)\})
So you but this in your settings:
\\begin\\{(?:table|sidewaystable|figure|sidewaysfigure|algorithm)\\})
but when the regex is read in from the JSON setting string, the regex looks like this:
\begin\{(?:table|sidewaystable|figure|sidewaysfigure|algorithm)\})
So basically â\beginâ wasnât sufficiently escaped in the JSON setting string to translate to an appropriate escaped regexâŚI know, I know this is the convoluted stuff that happens when you represent a regex expression in a string.
This is what you need:
[pre=#252525] {
â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
},[/pre]