Please follow the below template, it will help us to help you!
Hello,
today i updated gravity before update PiHole v6.1.3 but from this point was unable to reach github.com
I found the list who generated the problem and checked inside for a error in list but was correct.
The bang character is not a character that is generally accepted or viewed as a comment indicator. This isn't a change that I'm willing to make. The list maintainer needs to format their list in a way that is generally acceptable. There really should not be any domains lines that are commented, they should just be removed, that's what git is for. The removal of lines prepended with # is for ignoring frontmatter or headers.
The list you used as example (https://easylist.to/easylist/easylist.txt) is not really compatible with Pi-hole.
Even removing the "comments" starting with !, almost every entry will be ignored by Pi-hole because they are not domains.
Only lines starting with || and ending with ^ will be used. Everything else will be ignored by Pi-hole:
### These entries are invalid for Pi-hole:
||securecloud-smart.com^$popup # This rule was made to work only with CSS class "popup", but Pi-hole doesn't see content
||141.98.82.232^ # IPs are not domains
/(https?:\/\/)217\.182\.11\..{100,}/ # Pi-hole doesn't receive queries containing `https://` or IPs
### and so on...
Including support for ABP style lists (that was in the original Pi-hole code but removed around version 4 because it was very difficult to try and figure out what the list was intending to do) meant that we only allow and recognize a single format for the domains. I'm not fully sure why ||github.com^ was seen or converted from ! github.com because we only look for that specific ||<domain>^ pattern and do not try to convert or modify any other lines.
That said, I'll check on the FTL side to see how that parsing process is handling things. It may indeed already account for the ! style comments.
Here's the parsing code and it's pretty well commented. The ABP style comment is skipped so I'm not sure how you ended up with ||github.com^ as a filter.
Presumably by the time you downloaded the list to see if it contained github.com the correction had already been made, but your gravity hadn't been updated (because it couldn't get to github to get the new list) and was still blocking it.