mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 13:02:28 +08:00
handle multibyte string when linting text with redpen (#1416)
* handle multibyte string when linting text with redpen * fix error when no string is provided, fix test's expect value * remove ambiguious `==` operator
This commit is contained in:
@@ -23,6 +23,15 @@ Execute(redpen handler should handle errors output):
|
||||
\ 'type': 'W',
|
||||
\ 'code': 'Spelling',
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'col': 35,
|
||||
\ 'end_lnum': 1,
|
||||
\ 'end_col': 55,
|
||||
\ 'text': 'Found possibly misspelled word "コードチェック".',
|
||||
\ 'type': 'W',
|
||||
\ 'code': 'Spelling',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), [
|
||||
\ '[',
|
||||
@@ -50,6 +59,21 @@ Execute(redpen handler should handle errors output):
|
||||
\ ' "lineNum": 1,',
|
||||
\ ' "sentenceStartColumnNum": 0,',
|
||||
\ ' "message": "Found possibly misspelled word \"NeoVim\"."',
|
||||
\ ' },',
|
||||
\ ' {',
|
||||
\ ' "sentence": "ALEはNeoVimとVim8で非同期のコードチェックを実現するプラグインです。",',
|
||||
\ ' "endPosition": {',
|
||||
\ ' "offset": 27,',
|
||||
\ ' "lineNum": 1',
|
||||
\ ' },',
|
||||
\ ' "validator": "Spelling",',
|
||||
\ ' "lineNum": 1,',
|
||||
\ ' "sentenceStartColumnNum": 0,',
|
||||
\ ' "message": "Found possibly misspelled word \"コードチェック\".",',
|
||||
\ ' "startPosition": {',
|
||||
\ ' "offset": 20,',
|
||||
\ ' "lineNum": 1',
|
||||
\ ' }',
|
||||
\ ' }',
|
||||
\ ' ]',
|
||||
\ ' }',
|
||||
|
||||
Reference in New Issue
Block a user