File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -88,4 +88,19 @@ def project do
88
88
end
89
89
EOF
90
90
end
91
+
92
+ it 'detects atoms containing @ in it' do
93
+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirAtom' , '@somewhere' )
94
+ :atom@somewhere
95
+ EOF
96
+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirAtom' , '@somewhere' )
97
+ [atom@somewhere: nil]
98
+ EOF
99
+ end
100
+
101
+ it 'detects atoms containing Unicode letters in it' do
102
+ expect ( <<~EOF ) . to include_elixir_syntax ( 'elixirAtom' , 'ó' )
103
+ :atóm
104
+ EOF
105
+ end
91
106
end
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ syn match elixirOperator '\\\\\|::\|\*\|/\|\~\~\~\|@'
41
41
42
42
syn match elixirAlias ' \( [a-z]\)\@ <![A-Z]\w *\% (\. [A-Z]\w *\) *'
43
43
44
- syn match elixirAtom ' \( :\)\@ <!:\% ([a-zA-Z_]\w *\% ([?!]\| =[>=]\@ !\)\?\| <>\| ===\?\| >=\?\| <=\?\) '
44
+ syn match elixirAtom ' \( :\)\@ <!:\% ([a-zA-Z_]\% ( \w\| @ \|\P\) *\% ([?!]\| =[>=]\@ !\)\?\| <>\| ===\?\| >=\?\| <=\?\) '
45
45
syn match elixirAtom ' \( :\)\@ <!:\% (<=>\| &&\?\| %\( ()\|\[\]\| {}\)\| ++\?\| --\?\| ||\?\| !\| //\| [%&`/|]\) '
46
- syn match elixirAtom " \% ([a-zA-Z_]\w *[?!]\?\) :\( :\)\@ !"
46
+ syn match elixirAtom " \% ([a-zA-Z_]\% ( \w\| @ \|\P\) *[?!]\?\) :\( :\)\@ !"
47
47
48
48
syn keyword elixirBoolean true false nil
49
49
You can’t perform that action at this time.
0 commit comments