klorenz / atom-regex-railroad-diagrams

display regex as railroad diagram, if cursor moves to it
MIT License
250 stars 31 forks source link

Uncaught TypeError: Character index must be a number #110

Open jits opened 6 years ago

jits commented 6 years ago

[Enter steps to reproduce:]

  1. Open a project in Atom
  2. Error seemed to be triggered on an editor pane that's editing a shell script (though that may be irrelevant)

Atom: 1.29.0 x64 Electron: 2.0.5 OS: Mac OS X 10.13.4 Thrown From: regex-railroad-diagram package 0.19.4

Stack Trace

Uncaught TypeError: Character index must be a number

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/tree-sitter/index.js:195

TypeError: Character index must be a number
    at SyntaxNode.descendantForIndex (/app.asar/node_modules/tree-sitter/index.js:195:19)
    at TreeSitterLanguageMode.getRangeForSyntaxNodeContainingRange (/Applications/Atom.app/Contents/Resources/app/src/tree-sitter-language-mode.js:335:41)
    at TreeSitterLanguageMode.bufferRangeForScopeAtPosition (/Applications/Atom.app/Contents/Resources/app/src/tree-sitter-language-mode.js:343:23)
    at TextEditor.bufferRangeForScopeAtPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:3867:48)
    at TextEditor.bufferRangeForScopeAtCursor (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:3863:23)
    at Object.bufferRangeForScope (/packages/regex-railroad-diagram/lib/regex-railroad-diagram.coffee:87:25)
    at Object.getRegexpBufferRange (/packages/regex-railroad-diagram/lib/regex-railroad-diagram.coffee:133:14)
    at Object.checkForRegExp (/packages/regex-railroad-diagram/lib/regex-railroad-diagram.coffee:193:25)
    at /packages/regex-railroad-diagram/lib/regex-railroad-diagram.coffee:29:73
    at later (/packages/pigments/node_modules/underscore/underscore.js:724:25)

Commands

Non-Core Packages

angularjs 0.5.3 
angularjs-helper 0.10.2 
angularjs-snippets 0.10.18 
atom-beautify 0.32.5 
atom-mermaid 3.3.1 
atom-typescript 12.6.2 
autoclose-html 0.23.0 
autocomplete-bash-builtins 0.3.5 
busy-signal 1.4.3 
color-picker 2.3.0 
emmet 2.4.3 
execute-as-ruby 0.2.1 
formatter-jsbeautify 1.0.2 
git-time-machine 2.1.0 
go-debug 1.6.2 
go-plus 5.8.5 
go-signature-statusbar 1.2.3 
hyperclick 0.1.5 
intentions 1.1.5 
language-awk 0.1.12 
language-docker 1.1.8 
language-haml 0.31.1 
language-hcl 0.4.0 
language-lua 0.9.11 
language-markdown 0.26.0 
language-proto 0.8.0 
language-rust 0.4.12 
language-scala 1.1.9 
linter 2.2.0 
linter-checkbashisms 0.1.5 
linter-docker 0.3.2 
linter-eslint 8.4.1 
linter-haml 2.0.2 
linter-js-yaml 1.3.0 
linter-jshint 3.1.8 
linter-jsonlint 1.3.0 
linter-lua 1.0.4 
linter-protocol-buffer 0.2.0 
linter-rubocop 2.2.3 
linter-ruby 1.2.6 
linter-scalac 1.4.4 
linter-shellcheck 1.4.7 
linter-ui-default 1.7.1 
pigments 0.40.2 
pretty-json 2.0.1 
qolor 0.4.2 
regex-railroad-diagram 0.19.4 
ruby-block 0.3.6 
ruby-test 1.0.2 
script 3.18.1 
solarized-dark-ui 0.3.2 
split-diff 1.5.2 
text-manipulation 0.6.0 
turbo-javascript 1.4.0 
unity-ui 2.1.11 
JosephTLyons commented 6 years ago

Same errors on my end.