<p>Not sure when this started, and not sure why I didn't report this earlier. Open a latex file, and write an unmatched <code>[</code> (opening square bracket) after a command in math mode, i.e.: <code>$ a \in [0,2\pi) $</code></p>

<p>Expected behavior: Geany/ctags/IDon'tKnow still knows that we're in math mode, so an opening bracket does not necessarily start an optional argument.</p>

<p>Actual behavior: the opening bracket causes <em>everything</em> after it (including the text after math mode) to be highlighted as a command argument (i.e., bold blue).</p>

<p>Minimal working example:</p>

<pre><code>\documentclass[a4paper,parskip]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsfonts}

\begin{document}

\section{Hello}

We know that $angle(x,p) \in [0,2\pi)$ must hold.

\end{document}
</code></pre>

<p>Essentially the newest version:</p>

<pre><code>$ LC_ALL=C geany --version
geany 1.27 (git >= d1fcd9f) (built on 2016-01-03 with GTK 2.24.29, GLib 2.46.2)
</code></pre>

<p>The bugtracker does not seem to know this issue already. If this needs forwarding to ctags/scintilla/IDon'tKnow, please do that for me.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/859">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJzOOmCPZ9Cyk5UssvsSOyhISo2SJks5pX5_hgaJpZM4HBHzD.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/859"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>