Skip to content

Commit

Permalink
fix some CharList tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbodah committed Jun 16, 2021
1 parent e7caa59 commit 5808447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions autoload/elixir/indent.vim
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function! s:find_last_pos(lnum, text, match)
let peek_match = match(peek, a:match)
if peek_match == ss_match + 1
let syng = synIDattr(synID(a:lnum, c + ss_match, 1), 'name')
if syng !~ '\%(String\|Comment\)'
if syng !~ '\%(String\|Comment\|CharList\)'
return c + ss_match
end
end
Expand All @@ -165,7 +165,7 @@ function! elixir#indent#handle_top_of_file(context)
endfunction

function! elixir#indent#handle_starts_with_string_continuation(context)
if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\)$'
if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\|CharList\)$'
return -2
else
return -1
Expand Down
2 changes: 1 addition & 1 deletion spec/syntax/strings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

it 'charlist with escaped quote' do
expect(<<-'EOF').to include_elixir_syntax('elixirString', 'test')
expect(<<-'EOF').to include_elixir_syntax('elixirCharList', 'test')
'this \'test is all one charlist'
EOF
end
Expand Down

0 comments on commit 5808447

Please sign in to comment.