getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.69k stars 953 forks source link

Using embedding in custom sublime syntaxes causes panic #1607

Open marier-nico opened 3 years ago

marier-nico commented 3 years ago

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

jalil-salame commented 6 months ago

Related to #1678 which shows a workaround