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

Markdown breaking on JavaScript #183

Closed
wldcordeiro opened this issue Jul 3, 2018 · 4 comments
Closed

Markdown breaking on JavaScript #183

wldcordeiro opened this issue Jul 3, 2018 · 4 comments
Labels
bug Something isn't working syntax-highlighting
Milestone

Comments

@wldcordeiro
Copy link

If you create a markdown file with this content it'll break with bat and output this error, this may be an issue for upstream though reading the backtrace.

https://gist.github.com/wldcordeiro/136a85b2952a5ad91b2a5fecf13857b1

thread 'main' panicked at 'Can only call resolve on linked references: ByScope { scope: <source.javascript>, sub_context: None }', /Users/wellingtoncordeiro/.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
  10: bat::features::print_files
  11: bat::run
  12: bat::main
  13: std::rt::lang_start::{{closure}}
  14: std::panicking::try::do_call
  15: __rust_maybe_catch_panic
  16: std::rt::lang_start_internal
  17: main
@sharkdp sharkdp added bug Something isn't working syntax-highlighting labels Jul 4, 2018
@sharkdp
Copy link
Owner

sharkdp commented Jul 4, 2018

Thank you for reporting this. This is an upstream bug and I think it has recently been closed: sublimehq/Packages#1618

We probably just have to update sublimehq/Packages.

@sharkdp
Copy link
Owner

sharkdp commented Jul 5, 2018

I just confirmed that this can be fixed by updating sublimehq/Packages. We just have to wait for sublimehq/Packages#1644 to get merged, as there is a problem with the Perl syntax on master.

@felipesere
Copy link

sublimehq/Packages#1644 has been merged 😄
This issue is the only thing holding me back from upgrading from 0.2.3

@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
bug Something isn't working syntax-highlighting
Projects
None yet
Development

No branches or pull requests

3 participants