Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic at 'Can only call resolve on linked references...` #190

Closed
oceanlewis opened this issue Jul 20, 2018 · 2 comments
Closed

Panic at 'Can only call resolve on linked references...` #190

oceanlewis opened this issue Jul 20, 2018 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@oceanlewis
Copy link

oceanlewis commented Jul 20, 2018

File name: test.md, file contents:

```javascript
var test = "boom";
```

Here's a backtrace.

thread 'main' panicked at 'Can only call resolve on linked references: ByScope { scope: <source.javascript>, sub_context: None }', /Users/davidlewis/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/syntect-2.1.0/src/parsing/syntax_definition.rs:205:18
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic_fmt
   6: syntect::parsing::syntax_definition::ContextReference::resolve
   7: syntect::parsing::parser::ParseState::push_meta_ops
   8: syntect::parsing::parser::ParseState::parse_line
   9: syntect::easy::HighlightLines::highlight

I guess syntect is what's panicking, not bat. I'm on macOS 10.13.6 if you're unable to reproduce on your machine.

Thanks for the tool, by the way - I've been using it for a while and this is my first issue so far :)

@sharkdp
Copy link
Owner

sharkdp commented Jul 21, 2018

Thank you for the feedback!

This is a duplicate of #183 which has recently been closed. This should be fixed in the next release (or on master, if you want to build it yourself)

@sharkdp sharkdp added the duplicate This issue or pull request already exists label Jul 21, 2018
@sharkdp sharkdp closed this as completed Jul 21, 2018
@sharkdp
Copy link
Owner

sharkdp commented Aug 19, 2018

Fixed in bat 0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants