Fix Ruby syntax highlighting for predefined variables (#3778)

This commit is contained in:
Mikko
2025-06-20 21:53:46 +03:00
committed by GitHub
parent 5eddf5b85d
commit 29dc892009

View File

@@ -21,6 +21,10 @@ rules:
- constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
- constant.number: "(?i)\\b0b[01][01_]*\\b"
- constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
# Predefined global variables
- constant:
start: "[$]([!@&`'+~=/\\\\,;.<>*$?:\"_]|-[A-Za-z0-9_]|[0-9]+)"
end: "\\B|\\b"
# Ruby "Symbols"
- constant: "(i?)([ ]|^):[0-9A-Z_]+\\b"
- constant: "\\b(__FILE__|__LINE__)\\b"