<p>Geany wrongly colors sequences starting with a percentage sign (%).<br>
Program that illustrates some issues:</p>
<pre><code>n = 1337;
w = r = 5
x = n%w + 1; # "%w " is recognised as the beginning of an array of words, like %w[ ... ]
y = n%r ;   # "%r " is recognised as the beginning of a regular expression
string = %= this is a string = ;  # this one is correctly colored
n %= w;  # this is the most important issue, the expression is equivalent to n = n % w; but it's recognised like the previous line
print x%r  # %r is also recognised like a beginning of regex, but in this case, the %= of the previous line is still not terminated (no equal sign encoutered).
</code></pre>
<p>Tested on Geany 1.33 on Linux (Debian).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2038">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ0IqYaS4DLz2a0JBs7vZURTY_qK-ks5vAPc5gaJpZM4ZyCLW">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ__qB7E8Vu2KwMj0ZBRBTh4daOIdks5vAPc5gaJpZM4ZyCLW.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Ruby wrong syntax highlighting (#2038)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/2038"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2038",
"url": "https://github.com/geany/geany/issues/2038",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>