-
Notifications
You must be signed in to change notification settings - Fork 144
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
fancy-regex: problems with patterns in some syntaxes #287
Comments
cc @robinst any thoughts on what might needed to be added to either the rewriter or fancy-regex to fix these and guesses as to how much work it would be? |
Ah damn I was about to try it in Zola and rust-onig still hasn't shipped a new version with optional bindgen :( @sharkdp how do you feel about creating a repository to contain all .sublime-syntaxes? We are kind of duplicating work in Zola and bat (and potentially other tools) having our own repo of syntaxes. |
Sounds like a great idea. Should we move this discussion to Update: see sharkdp/bat#919 |
Same as Oniguruma. See trishume/syntect#287 where the lack of support for this is a problem.
Yeah, I think some of these should be easy to fix in fancy-regex, e.g. |
@robinst any chance you can release a new version of fancy-regex? I want to update some syntaxes and want to know exactly which ones are failing after your latest patches. |
@Keats Published version 0.3.4 now: https://github.com/fancy-regex/fancy-regex/blob/master/CHANGELOG.md#034---2020-04-28 Note that it's unlikely that I'll implement |
Also created a PR to make error messages include what the unknown flag/escape is: fancy-regex/fancy-regex#46 |
Thanks a lot @robinst , I'll give it a try asap |
Released fancy-regex/fancy-regex#46 as 0.3.5 |
It looks like a lot of syntaxes are using |
For
Should be the same as:
(But |
|
Hmm so do you know why none of the built-in syntaxes use |
I believe that is correct, yes. |
fancy-regex 0.4.0 now supports named groups and backrefs, see changelog. |
I just tried the fancy-regex version of syntect for the first time (thank you for everyone involved!).
Here are a few of the problems I have encountered so far:
.sublime-syntax
conversion and possibly regex rewriting in syntect).This list continues for quite some time, but I'm not sure if it's worth to list them all. Most of them seem to be related to "unknown group flag" or "invalid escape".
Note: I just wanted to try this out within
bat
, there is absolutely no "pressure" to get this fixed (as always, of course 😄). I was just curious and thought this might help.The text was updated successfully, but these errors were encountered: