[TxMt] Re: String of text causes CPU to 100%
Quinn Comendant
quinn at strangecode.com
Fri Jan 3 04:07:21 UTC 2020
On 27 Dec 2019 10:03:52, Jacob Carlborg wrote:
> If you open the bundle editor and select a bundle item, then there’s
> a checkbox in the drawer to enable/disable the item.
Thanks. By process of elimination, I was able to narrow the problem down to a language grammar I had modified: `Mail.tmbundle/Syntaxes/Email Address.tmLanguage`.
I changed this:
(?i)\b([A-Z][A-Z0-9._%+-]+)@([A-Z0-9.\-]+)\.([A-Z]{2,4})\b
To this:
(?i)\b([A-Z0-9][A-Z0-9._%+-]+)+@([A-Z0-9.\-]+)\.([A-Z]{2,4})\b
Which apparently causes infinite parsing, although I can't see why.
I was trying to fix the regex so that it will match email addresses containing dots or beginning with a number, e.g.:
This is correctly identified as markup.underline.link.email.hyperlink:
testuser at example.com
But these are not:
1testuser at example.com
test.user at example.com
Any help would be appreciated how to get those email addresses to parse too.
Regards,
Quinn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-01-02 at 22.02.53.png
Type: image/png
Size: 21154 bytes
Desc: not available
URL: <https://lists.macromates.com/textmate/attachments/20200102/dcddb8af/attachment-0001.png>
More information about the TextMate
mailing list