@@ -107,27 +107,29 @@ syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=ruby
107107syn region rubyNestedSquareBrackets start =" \[ " skip =" \\\\\|\\\] " matchgroup =rubyString end =" \] " transparent contained
108108
109109" Regular Expression Metacharacters {{{1
110- " These are mostly Oniguruma ready
111- syn region rubyRegexpComment matchgroup =rubyRegexpSpecial start =" (?#" skip =" \\\\\|\\ )" end =" )" contained
112- syn region rubyRegexpParens matchgroup =rubyRegexpSpecial start =" (\( ?:\| ?<\= [=!]\| ?>\| ?<[a-z_]\w *>\| ?[imx]*-[imx]*:\=\|\% (?#\)\@ !\) " skip =" \\\\\|\\ )" end =" )" contained transparent contains =@rubyRegexpSpecial
113- syn region rubyRegexpBrackets matchgroup =rubyRegexpCharClass start =" \[\^\= " skip =" \\\\\|\\\] " end =" \] " contained transparent contains =rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline
114- syn match rubyRegexpCharClass " \\ [DdHhSsWw]" contained display
115- syn match rubyRegexpCharClass " \[ :\^\=\% (alnum\| alpha\| ascii\| blank\| cntrl\| digit\| graph\| lower\| print\| punct\| space\| upper\| word\| xdigit\) :\] " contained
116- syn match rubyRegexpEscape " \\ [].*?+^$|\\ /(){}[]" contained
117- syn match rubyRegexpQuantifier " [*?+][?+]\= " contained display
118- syn match rubyRegexpQuantifier " {\d\+\% (,\d *\)\= }?\= " contained display
119- syn match rubyRegexpAnchor " [$^]\|\\ [ABbGZz]" contained display
120- syn match rubyRegexpDot " \. " contained display
121- syn match rubyRegexpSpecial " |" contained display
122- syn match rubyRegexpSpecial " \\ [1-9]\d\=\d\@ !" contained display
123- syn match rubyRegexpSpecial " \\ k<\% ([a-z_]\w *\| -\=\d\+\)\% ([+-]\d\+\)\= >" contained display
124- syn match rubyRegexpSpecial " \\ k'\% ([a-z_]\w *\| -\=\d\+\)\% ([+-]\d\+\)\= '" contained display
125- syn match rubyRegexpSpecial " \\ g<\% ([a-z_]\w *\| -\=\d\+\) >" contained display
126- syn match rubyRegexpSpecial " \\ g'\% ([a-z_]\w *\| -\=\d\+\) '" contained display
110+ syn region rubyRegexpComment matchgroup =rubyRegexpSpecial start =" (?#" skip =" \\\\\|\\ )" end =" )" contained
111+ syn region rubyRegexpParens matchgroup =rubyRegexpSpecial start =" (\( ?:\| ?<\= [=!]\| ?>\| ?<[a-z_]\w *>\| ?[imx]*-[imx]*:\=\|\% (?#\)\@ !\) " skip =" \\\\\|\\ )" end =" )" contained transparent contains =@rubyRegexpSpecial
112+ syn region rubyRegexpBrackets matchgroup =rubyRegexpCharClass start =" \[\^\= " skip =" \\\\\|\\\] " end =" \] " contained transparent contains =rubyRegexpBrackets,rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass,rubyRegexpIntersection oneline
113+ syn match rubyRegexpCharClass " \\ [DdHhRSsWw]" contained display
114+ syn match rubyRegexpCharClass " \[ :\^\=\% (alnum\| alpha\| ascii\| blank\| cntrl\| digit\| graph\| lower\| print\| punct\| space\| upper\| word\| xdigit\) :\] " contained
115+ syn match rubyRegexpCharClass " \\ [pP]{^\= .\{ -}}" contained display
116+ syn match rubyRegexpEscape " \\ [].*?+^$|\\ /(){}[]" contained " see commit e477f10
117+ syn match rubyRegexpQuantifier " [*?+][?+]\= " contained display
118+ syn match rubyRegexpQuantifier " {\d\+\% (,\d *\)\= }?\= " contained display
119+ syn match rubyRegexpAnchor " [$^]\|\\ [ABbGZz]" contained display
120+ syn match rubyRegexpDot " \.\|\\ X" contained display
121+ syn match rubyRegexpIntersection " &&" contained display
122+ syn match rubyRegexpSpecial " \\ K" contained display
123+ syn match rubyRegexpSpecial " |" contained display
124+ syn match rubyRegexpSpecial " \\ [1-9]\d\=\d\@ !" contained display
125+ syn match rubyRegexpSpecial " \\ k<\% ([a-z_]\w *\| -\=\d\+\)\% ([+-]\d\+\)\= >" contained display
126+ syn match rubyRegexpSpecial " \\ k'\% ([a-z_]\w *\| -\=\d\+\)\% ([+-]\d\+\)\= '" contained display
127+ syn match rubyRegexpSpecial " \\ g<\% ([a-z_]\w *\| -\=\d\+\) >" contained display
128+ syn match rubyRegexpSpecial " \\ g'\% ([a-z_]\w *\| -\=\d\+\) '" contained display
127129
128130syn cluster rubyStringSpecial contains =rubyInterpolation,rubyStringEscape
129131syn cluster rubyExtendedStringSpecial contains =@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets
130- syn cluster rubyRegexpSpecial contains =rubyInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment
132+ syn cluster rubyRegexpSpecial contains =rubyInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment,rubyRegexpIntersection
131133
132134" Numbers {{{1
133135syn match rubyInteger " \% (\% (\w\| []})\" ']\s *\)\@ <!-\)\=\< 0[xX]\x\+\% (_\x\+\) *r\= i\=\> " display
@@ -455,6 +457,7 @@ hi def link rubyRegexpQuantifier rubyRegexpSpecial
455457hi def link rubyRegexpAnchor rubyRegexpSpecial
456458hi def link rubyRegexpDot rubyRegexpCharClass
457459hi def link rubyRegexpCharClass rubyRegexpSpecial
460+ hi def link rubyRegexpIntersection rubyRegexpSpecial
458461hi def link rubyRegexpSpecial Special
459462hi def link rubyRegexpComment Comment
460463hi def link rubyRegexp rubyString
0 commit comments