Open theredcmdcraft opened 1 month ago
Sorry, I do not know much about nftables syntax and syntax highlighting so I cannot review much. There is nothing else I can properly suggest but the header pattern is still at least not changed.
Oh sorry, i didn`t see the "suggested change". I thought it had already been changed.
Sorry, I do not know much about nftables syntax and syntax highlighting so I cannot review much. There is nothing else I can properly suggest but the header pattern is still at least not changed.
Can someone else check the code? Or can you merge it simply?
Can someone else check the code? Or can you merge it simply?
I cannot merge pull requests but I tried reviewing again. I do not know much about syntax highlighting so I think it is better if another person reviews a bit. I think not adding all expressions and merging may be fine for now.
I looked at nft(8)
manpage as a reference but I think reading it may be confusing when not looking at the wiki first.
It may look weird if groups in IPv6 addresses with hex digits are not highlighted but integers can be highlighted using this rule:
- constant.number: "\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+)\\b"
There is a lot of expressions in nftables but the keywords suggested are usually used so it may be fine highlighting them only for now.
i think we must not check everything at the first time. there is also a tool called nft
. with the command nft -c -f <path to file>
you can check the nftables syntax before you restart the service. this will prompt you if there is an error in your config file.
Created nftables syntax highlighting