I'd like to use this plugin to highlight LaTeX citing code, so e.g. \cite{Smith2020}. I'd like to permanently highlight everything between the \ and the }.
According to regexr.com this should work: (?<=\\)(.*?)(?=\}), i.e. it should highlight everything between a backslash \ and a }, so that \cite{Smith2020} would be highlighted.
The plugin doesn't like that though. When I do it via the GUI nothing happens, but when I try importing a highlighter, using the template from the github page:
I'd like to use this plugin to highlight LaTeX citing code, so e.g.
\cite{Smith2020}
. I'd like to permanently highlight everything between the\
and the}
.According to regexr.com this should work:
(?<=\\)(.*?)(?=\})
, i.e. it should highlight everything between a backslash\
and a}
, so that\cite{Smith2020}
would be highlighted.The plugin doesn't like that though. When I do it via the GUI nothing happens, but when I try importing a highlighter, using the template from the github page:
I get the error:
Error importing highlighters: SyntaxError: Unexpected token } in JSON at position 138.
So it seems that the escape character isn't read?
I've also tried this:
\\(.*?)\}
but with the same result. Again according to that regexr website it should work.It's not just curly brackets btw. It also can't escape
)
Any ideas?