AutoIt / SublimeAutoItScript

AutoItScript Au3 language package for SublimeText including syntax highlighting, comments toggling, auto-completions, build systems for run and compile, Tidy command, IncludeHelper command.
https://www.autoitscript.com/forum/forum/7-autoit-technical-discussion/
MIT License
29 stars 11 forks source link

Break huge regex for PCRE compatibility #33

Closed pchaigno closed 6 years ago

pchaigno commented 6 years ago

This grammar is used on GitHub.com to highlight AutoIt. Whereas Sublime Text uses the Oniguruma regular expression library, GitHub relies on PCRE. PCRE imposes a maximum size of 64kb per regular expression. The support.function.other.autoit is 75kb.

FichteFoll commented 6 years ago

I suspect you broke the regex at the last position possible to still remain within the 64kb size per expression? I would rather split the expression in the middle to avoid encountering this again in the future when something is added to the regex.

A comment mentioning the reason for a split should also be added.

pchaigno commented 6 years ago

I suspect you broke the regex at the last position possible to still remain within the 64kb size per expression?

Yes

I would rather split the expression in the middle to avoid encountering this again in the future when something is added to the regex. A comment mentioning the reason for a split should also be added.

Yep, that makes sense. I updated the branch.