I get the following panic : thread '<unnamed>' panicked at 'Can only call resolve on linked references: ByScope { scope: <source.bash>, sub_context: None }', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-4.6.0/src/parsing/syntax_definition.rs:191:18
I did some digging, and my best guess as to what's causing the panic is that syntect can't see the existing bash syntax, or maybe it's not made aware of it. I'm not sure of how Zola is using syntect or how syntect works, so I don't really have a more precise idea, but I think that might be it. At the very least, I'm almost certain the embed in the sublime-syntax is triggering the issue here.
Step to reproduce
Run zola init to make a new basic project (and enable code highlighting)
Create content/_index.md and inside create a code block with the crontab language (it's important to have the script part because that's where the bash embed is used)
```crontab
0 0 * * * /some/script
Edit config.toml to add extra_syntaxes = ["syntaxes"] under the [markdown] section
Create syntaxes/Crontab.sublime-syntax with the contents of this file
In syntaxes/Crontab.sublime-syntax, replace source.shell with source.bash on lines 201 and 210
Bug Report
Environment
Zola version: 0.14.1
Expected Behavior
Zola builds the site without any errors.
Current Behavior
I get the following panic :
thread '<unnamed>' panicked at 'Can only call resolve on linked references: ByScope { scope: <source.bash>, sub_context: None }', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-4.6.0/src/parsing/syntax_definition.rs:191:18
I did some digging, and my best guess as to what's causing the panic is that syntect can't see the existing bash syntax, or maybe it's not made aware of it. I'm not sure of how Zola is using syntect or how syntect works, so I don't really have a more precise idea, but I think that might be it. At the very least, I'm almost certain the embed in the sublime-syntax is triggering the issue here.
Step to reproduce
zola init
to make a new basic project (and enable code highlighting)content/_index.md
and inside create a code block with thecrontab
language (it's important to have the script part because that's where the bash embed is used)config.toml
to addextra_syntaxes = ["syntaxes"]
under the[markdown]
sectionsyntaxes/Crontab.sublime-syntax
with the contents of this filesyntaxes/Crontab.sublime-syntax
, replacesource.shell
withsource.bash
on lines 201 and 210zola build