Firacode: Regex groups

Created on 8 Jul 2018  Â·  3Comments  Â·  Source: tonsky/FiraCode

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>>>
(?-
(?+
conflict

Most helpful comment

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

All 3 comments

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

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).

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hatched picture hatched  Â·  3Comments

mlajtos picture mlajtos  Â·  4Comments

pamu picture pamu  Â·  3Comments

Jhynn picture Jhynn  Â·  4Comments

tomByrer picture tomByrer  Â·  4Comments