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

Regex groups #624

Closed
whatisaphone opened this issue Jul 8, 2018 · 3 comments
Closed

Regex groups #624

whatisaphone opened this issue Jul 8, 2018 · 3 comments
Labels

Comments

@whatisaphone
Copy link

First off, thanks for putting together this font, I've been using it for years and I love it! 😃

It would be nice if the font worked a little better with regex. Here are a few types of regex groups:

(?=
(?!
(?<=
(?<!

In FiraCode they are rendered very inconsistently. Some have ligatures, some don't. (?<= is particularly bad since it groups the <= as something semantically unrelated while leaving the ? out to dry. That one throws me off every time I see it. I'm not even asking for more ligatures 😅 but it would be a definite improvement to force those specific sequences to always stay independent. I hope (? is unique enough that it can always be assumed to be part of a regex.

Here is a hopefully complete list (Source). I've only noticed this issue with syntax that starts with (? so those are the only ones I included (and wow, there are way more of them than I thought)

(?:
(?<
(?'
(?#
(?|
(?>
(?=
(?!
(?<=
(?<!
(?(?=
(?(
(?(<
(?('
(?(<<<digit>>>
(?(-
(?(+
(?&
(?P<
(?P=
(?P>
(?R)
(?<<<digit>>>
(?-
(?+
@tonsky
Copy link
Owner

tonsky commented Jul 8, 2018

Thanks for the list! I’ll try disabling ligatures after (, that should help

@tonsky tonsky added the conflict label Jul 8, 2018
@whatisaphone
Copy link
Author

Did you mean (?? Disabling after just ( won't help the (?<= case, and also seems too broad – it would break 16 (0x10) and Google (www.google.com).

@tonsky
Copy link
Owner

tonsky commented Jul 9, 2018

Not all ligatures, only ones that conflict with groups in regexps

@tonsky tonsky closed this as completed in 0a6f6e6 Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants