Skip to content

Commit

Permalink
More reliable function title in Gams
Browse files Browse the repository at this point in the history
The function title regex is responsible for advancing the parser
but didn't pick up one-letter title, resulting in an infinite loop
for things like:

    I ..

Fixes #1505
  • Loading branch information
isagalaev committed Apr 29, 2017
1 parent 5c709a4 commit d05317a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/gams.js
Expand Up @@ -149,7 +149,7 @@ function (hljs) {
contains: [
{ // Function title
className: 'title',
begin: /^[a-z][a-z0-9_]+/,
begin: /^[a-z0-9_]+/,
},
PARAMS,
SYMBOLS,
Expand Down

0 comments on commit d05317a

Please sign in to comment.