bat panics on simple Vue file

Created on 12 Apr 2020  Â·  3Comments  Â·  Source: sharkdp/bat

When calling bat on this Vue file

<style lang="stylus">
</style>

it panics with:

thread 'main' panicked at
  'Can only call resolve on linked references:
    ByScope { scope: <source.stylus>, sub_context: None }',
  …/syntect-4.1.0/src/parsing/syntax_definition.rs:188:18

found with the Python script in #913.

bug syntax-highlighting

Most helpful comment

Thank you for reporting this. That's unfortunate.

It should be possible to somehow verify that syntaxes do not include broken references when building the binary assets. This might need to be fixed upstream (in syntect).

All 3 comments

This happens because we didn't have a syntax for "Stylo" source code, which is included from the Vue syntax when using <style lang="stylus">.

thread 'main' panicked at 'Can only call resolve on linked references: ByScope { scope: <text.pug>, sub_context: None }', /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-3.3.0/src/parsing/syntax_definition.rs:192:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I meet same error with single Vue component file with pug template syntax.

Thank you for reporting this. That's unfortunate.

It should be possible to somehow verify that syntaxes do not include broken references when building the binary assets. This might need to be fixed upstream (in syntect).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scalp42 picture scalp42  Â·  3Comments

doggy8088 picture doggy8088  Â·  4Comments

gAmUssA picture gAmUssA  Â·  3Comments

gwpl picture gwpl  Â·  3Comments

tbsvttr picture tbsvttr  Â·  3Comments