Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST4 loading error: Error in regex #242

Open
Levitanus opened this issue Oct 31, 2021 · 2 comments
Open

ST4 loading error: Error in regex #242

Levitanus opened this issue Oct 31, 2021 · 2 comments

Comments

@Levitanus
Copy link

  • Editor name and version:
  • SublimeText4: 4121
  • Platform:
  • Ubuntu 20.10
  • Color scheme:
  • any: monokau, matherialUi, MaterialUiImproved
  • MagicPython version:
  • 1.1.1
  • A sreenshot:
  • 5-10 lines of surrounding code:
    The error:
error: Error loading syntax file "Packages/MagicPython/grammars/MagicPython.tmLanguage": Error in regex: target of repeat operator is invalid in regex (?x)
  (.+?)
    (
      (?# .* and .*? in multi-line match need special handling of
        newlines otherwise SublimeText and Atom will match slightly
        differently.

        The guard 

Since the regex is very common in the tmlanguage I'm confused in ways to solve this...

Syntax is not highlighted((

ni-max added a commit to ni-max/MagicPython that referenced this issue Nov 22, 2021
…valid in regex

Fixes: MagicStack#242

SublimeText 4 (as of build 4121) evaluates this valid regex: `\n?` to this invalid one: `$?`
hence causing the following error:

```
error: Error loading syntax file "Packages/<Path_To>.tmLanguage": Error in regex: target of repeat operator is invalid in regex
```

This commit is a workaround to fix this problem.
@ni-max
Copy link

ni-max commented Nov 22, 2021

@Levitanus check my pull request for the fix.

Please post an issue to the upstream, I believe this is a bug in SublimeText 4 since I've seen this error in other packages as well.

@Levitanus
Copy link
Author

@ni-max , Thank You, I'll try to check tomorrow, too much work outside the PC...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants