-
Notifications
You must be signed in to change notification settings - Fork 382
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/crash when diffing Vue files with pug syntax in the template #634
Comments
@sharkdp would you mind suggesting next steps here? (I know you have experience with several similar issues). The example code fragment below, when named with a @CodeGradox -- thanks. I believe this is a bug in an upstream library, but I am not sure whether it is in https://github.com/vuejs/vue-syntax-highlight or https://github.com/trishume/syntect, or both. Your example file also crashes bat which, like delta, uses syntect for syntax highlighting. The bug can be reproduced in the syntect repo, using the syntax definition file from bat, with a line like this:
where <template lang="pug">
hello
</template> I think that syntect does not promise never to panic with any user syntax definition, therefore this is not necessarily a bug in syntect. bat looks to be running the current HEAD of the
|
I see that something like this is fine (e.g. does not crash bat) <template lang="pugxxx">
hello
</template> but valid references such as |
@dandavison Thank you for the mention. Some possible next steps are discussed in this ticket: sharkdp/bat#915. In particular, see this comment by @keith-hall. The tracking issue to fix this in |
Oh, thank you @sharkdp -- I somehow missed that issue. |
+1 on this. |
@hedefalk bat and syntect contributors are working on this, see sharkdp/bat#915. Currently the demo Vue file still crashes bat, so I think we should follow / help with their work, and then adopt their solution. |
Long time no see. It looks like sharkdp/bat#915 has been resolved. |
Delta crashes when diffing a Vue file with uses the pug template engine.
Delta is setup like this in
~/.gitconfig
To reproduce simply create a new folder and init git. Then add the following Vue file and commit it. Finally, you add a change to code inside the
<template>
tag and rungit diff
.Changing anything inside the
<script>
tag does not cause a panic. Delta does not panic if I remove thelang="pug"
from the<template>
tag.The text was updated successfully, but these errors were encountered: